Skip to content
Snippets Groups Projects
Commit d5eb3a7b authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Android: revert to minSdkVersion=19

parent c259de86
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<preference name="KeyboardResizeMode" value="ionic" /> <preference name="KeyboardResizeMode" value="ionic" />
<preference name="xwalkVersion" value="19" /> <preference name="xwalkVersion" value="19" />
<preference name="xwalkMultipleApk" value="false" /> <preference name="xwalkMultipleApk" value="false" />
<preference name="android-minSdkVersion" value="20" /> <preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="28" /> <preference name="android-targetSdkVersion" value="28" />
<preference name="StatusBarOverlaysWebView" value="false" /> <preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000" /> <preference name="StatusBarBackgroundColor" value="#000" />
......
...@@ -31,7 +31,7 @@ if (rootdir) { ...@@ -31,7 +31,7 @@ if (rootdir) {
.pipe(replace(/<uses-sdk [^>]+\/>/g, '')) .pipe(replace(/<uses-sdk [^>]+\/>/g, ''))
// add <uses-sdk> (replace 'targetSdkversion' and add tools:overrideLibrary) // add <uses-sdk> (replace 'targetSdkversion' and add tools:overrideLibrary)
.pipe(replace(/(<\/manifest>)/, ' <uses-sdk android:minSdkVersion="20" android:targetSdkVersion="28" tools:overrideLibrary="org.kaliumjni.lib" />\n$1')) .pipe(replace(/(<\/manifest>)/, ' <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" tools:overrideLibrary="org.kaliumjni.lib" />\n$1'))
.pipe(gulp.dest(platformPath)); .pipe(gulp.dest(platformPath));
......
...@@ -14,6 +14,12 @@ if [[ ! -f "${PROJECT_DIR}/package.json" ]]; then ...@@ -14,6 +14,12 @@ if [[ ! -f "${PROJECT_DIR}/package.json" ]]; then
fi; fi;
echo "Preparing project environment.." echo "Preparing project environment.."
PROJECT_NAME="cesium"
REPO="duniter/cesium"
REPO_API_URL="https://api.github.com/repos/${REPO}"
REPO_PUBLIC_URL="https://github.com/${REPO}"
NODEJS_VERSION=10 NODEJS_VERSION=10
ANDROID_NDK_VERSION=r19c ANDROID_NDK_VERSION=r19c
...@@ -130,3 +136,14 @@ if [[ ! -d "${PROJECT_DIR}/node_modules" ]]; then ...@@ -130,3 +136,14 @@ if [[ ! -d "${PROJECT_DIR}/node_modules" ]]; then
cd ${PROJECT_DIR} cd ${PROJECT_DIR}
yarn yarn
fi fi
# Install project submodules
if [[ ! -d "${PROJECT_DIR}/platforms/android" || ! -d "${PROJECT_DIR}/dist/desktop" ]]; then
echo "Installing project submodules..."
cd ${PROJECT_DIR}
git submodule init && git submodule sync && git submodule update --remote --merge
if [[ $? -ne 0 ]]; then
echo "Unable to sync git submodule. Will not be able to build android and desktop artifacts!"
exit 1
fi
fi
...@@ -27,13 +27,6 @@ if [[ "_$current" == "_" ]]; then ...@@ -27,13 +27,6 @@ if [[ "_$current" == "_" ]]; then
fi fi
echo "Current version: $current" echo "Current version: $current"
### Get repo URL
PROJECT_NAME=cesium
REPO="duniter/cesium"
REPO_API_URL="https://api.github.com/repos/${REPO}"
REPO_PUBLIC_URL="https://github.com/${REPO}"
### get auth token ### get auth token
GITHUB_TOKEN=$(cat ~/.config/${PROJECT_NAME}/.github) GITHUB_TOKEN=$(cat ~/.config/${PROJECT_NAME}/.github)
if [[ "_$GITHUB_TOKEN" != "_" ]]; then if [[ "_$GITHUB_TOKEN" != "_" ]]; then
......
...@@ -77,41 +77,41 @@ if [[ $? -ne 0 ]]; then ...@@ -77,41 +77,41 @@ if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
cd ${PROJECT_DIR}
git submodule init && git submodule sync && git submodule update --remote --merge
if [[ $? -ne 0 ]]; then
echo "Unable to sync git submodule. Could not build desktop version"
exit 1
fi
echo "----------------------------------" echo "----------------------------------"
echo "- Compiling sources..." echo "- Compiling sources..."
echo "----------------------------------" echo "----------------------------------"
gulp config build --env default_fr cd ${PROJECT_DIR} || exit 1
gulp config build --env default_fr || exit 1
echo "----------------------------------" echo "----------------------------------"
echo "- Building Android artifact..." echo "- Building Android artifact..."
echo "----------------------------------" echo "----------------------------------"
mkdir -p ${DIST_ANDROID} || exit 1
rm -rf ${DIST_ANDROID}/*.apk || exit 1
. scripts/build-android.sh --release . scripts/build-android.sh --release
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
APK_RELEASE_FILE="${ANDROID_OUTPUT_APK_RELEASE}/android-release.apk" APK_RELEASE_FILE="${ANDROID_OUTPUT_APK_RELEASE}/android-release.apk"
if [[ -f "${APK_RELEASE_FILE}" ]]; then if [[ -f "${APK_RELEASE_FILE}" ]]; then
mkdir -p ${DIST_ANDROID} mkdir -p ${DIST_ANDROID} || exit 1
cp ${APK_RELEASE_FILE} ${DIST_ANDROID}/${PROJECT_NAME}-v${current}-android.apk cp ${APK_RELEASE_FILE} ${DIST_ANDROID}/${PROJECT_NAME}-v$2-android.apk || exit 1
fi; fi;
echo "----------------------------------" echo "----------------------------------"
echo "- Building web artifact..." echo "- Building web artifact..."
echo "----------------------------------" echo "----------------------------------"
gulp config webBuild --env default --release cd ${PROJECT_DIR} || exit 1
gulp config --env default
gulp webBuild --release
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
DIST_WEB_FILE="${DIST_WEB}/${PROJECT_NAME}-v$2-web.zip"
if [[ ! -f "${DIST_WEB_FILE}" ]]; then
echo "ERROR: Missing web artifact at ${DIST_WEB_FILE}"
exit 1
fi;
echo "----------------------------------" echo "----------------------------------"
echo "- Executing git push, with tag: v$2" echo "- Executing git push, with tag: v$2"
...@@ -122,7 +122,7 @@ if [[ "_$description" == "_" ]]; then ...@@ -122,7 +122,7 @@ if [[ "_$description" == "_" ]]; then
fi fi
# Commit # Commit
cd ${PROJECT_DIR} cd ${PROJECT_DIR} || exit 1
git reset HEAD git reset HEAD
git add package.json config.xml install.sh www/js/config.js www/manifest.json git add package.json config.xml install.sh www/js/config.js www/manifest.json
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
...@@ -131,6 +131,7 @@ fi ...@@ -131,6 +131,7 @@ fi
git commit -m "v$2" git commit -m "v$2"
git tag -f -a "v$2" -m "${description}" git tag -f -a "v$2" -m "${description}"
git push origin "v$2" git push origin "v$2"
git push
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
...@@ -142,6 +143,7 @@ git add -A ...@@ -142,6 +143,7 @@ git add -A
git commit -m "v$2" git commit -m "v$2"
git tag -f -a "v$2" -m "${description}" git tag -f -a "v$2" -m "${description}"
git push origin "v$2" git push origin "v$2"
git push
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
...@@ -153,8 +155,7 @@ echo "**********************************" ...@@ -153,8 +155,7 @@ echo "**********************************"
echo " Waiting 40s, for propagation to github..." echo " Waiting 40s, for propagation to github..."
sleep 40s sleep 40s
. ${PROJECT_DIR}/scripts/github.sh $1 ''"$description"''
./github.sh $1 ''"$description"''
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
exit 1 exit 1
fi fi
...@@ -180,7 +181,7 @@ else ...@@ -180,7 +181,7 @@ else
exit 1 exit 1
fi; fi;
# back to nodejs version 6 # Back to nodejs
cd ${PROJECT_DIR} cd ${PROJECT_DIR}
nvm use ${NODEJS_VERSION} nvm use ${NODEJS_VERSION}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment