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
Branches
Tags
No related merge requests found
Pipeline #7534 failed
......@@ -28,7 +28,7 @@
<preference name="KeyboardResizeMode" value="ionic" />
<preference name="xwalkVersion" value="19" />
<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="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000" />
......
......@@ -31,7 +31,7 @@ if (rootdir) {
.pipe(replace(/<uses-sdk [^>]+\/>/g, ''))
// 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));
......
......@@ -14,6 +14,12 @@ if [[ ! -f "${PROJECT_DIR}/package.json" ]]; then
fi;
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
ANDROID_NDK_VERSION=r19c
......@@ -130,3 +136,14 @@ if [[ ! -d "${PROJECT_DIR}/node_modules" ]]; then
cd ${PROJECT_DIR}
yarn
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
fi
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
GITHUB_TOKEN=$(cat ~/.config/${PROJECT_NAME}/.github)
if [[ "_$GITHUB_TOKEN" != "_" ]]; then
......
......@@ -77,41 +77,41 @@ if [[ $? -ne 0 ]]; then
exit 1
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 "- Compiling sources..."
echo "----------------------------------"
gulp config build --env default_fr
cd ${PROJECT_DIR} || exit 1
gulp config build --env default_fr || exit 1
echo "----------------------------------"
echo "- Building Android artifact..."
echo "----------------------------------"
mkdir -p ${DIST_ANDROID} || exit 1
rm -rf ${DIST_ANDROID}/*.apk || exit 1
. scripts/build-android.sh --release
if [[ $? -ne 0 ]]; then
exit 1
fi
APK_RELEASE_FILE="${ANDROID_OUTPUT_APK_RELEASE}/android-release.apk"
if [[ -f "${APK_RELEASE_FILE}" ]]; then
mkdir -p ${DIST_ANDROID}
cp ${APK_RELEASE_FILE} ${DIST_ANDROID}/${PROJECT_NAME}-v${current}-android.apk
mkdir -p ${DIST_ANDROID} || exit 1
cp ${APK_RELEASE_FILE} ${DIST_ANDROID}/${PROJECT_NAME}-v$2-android.apk || exit 1
fi;
echo "----------------------------------"
echo "- Building web artifact..."
echo "----------------------------------"
gulp config webBuild --env default --release
cd ${PROJECT_DIR} || exit 1
gulp config --env default
gulp webBuild --release
if [[ $? -ne 0 ]]; then
exit 1
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 "- Executing git push, with tag: v$2"
......@@ -122,7 +122,7 @@ if [[ "_$description" == "_" ]]; then
fi
# Commit
cd ${PROJECT_DIR}
cd ${PROJECT_DIR} || exit 1
git reset HEAD
git add package.json config.xml install.sh www/js/config.js www/manifest.json
if [[ $? -ne 0 ]]; then
......@@ -131,6 +131,7 @@ fi
git commit -m "v$2"
git tag -f -a "v$2" -m "${description}"
git push origin "v$2"
git push
if [[ $? -ne 0 ]]; then
exit 1
fi
......@@ -142,6 +143,7 @@ git add -A
git commit -m "v$2"
git tag -f -a "v$2" -m "${description}"
git push origin "v$2"
git push
if [[ $? -ne 0 ]]; then
exit 1
fi
......@@ -153,8 +155,7 @@ echo "**********************************"
echo " Waiting 40s, for propagation to github..."
sleep 40s
./github.sh $1 ''"$description"''
. ${PROJECT_DIR}/scripts/github.sh $1 ''"$description"''
if [[ $? -ne 0 ]]; then
exit 1
fi
......@@ -180,7 +181,7 @@ else
exit 1
fi;
# back to nodejs version 6
# Back to nodejs
cd ${PROJECT_DIR}
nvm use ${NODEJS_VERSION}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment