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

[enh] Try to compile for OLD Android version (API 19)

parent 50fdc171
Branches feature/android_api_19
No related tags found
No related merge requests found
Pipeline #11259 failed
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="106012" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.12" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget android-versionCode="106120" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.13" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Cesium</name> <name>Cesium</name>
<description> <description>
An simple App for Duniter wallet An simple App for Duniter wallet
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<platform name="android"> <platform name="android">
<preference name="AndroidXEnabled" value="true" /> <preference name="AndroidXEnabled" value="true" />
<preference name="AndroidLaunchMode" value="singleTask" /> <preference name="AndroidLaunchMode" value="singleTask" />
<preference name="android-minSdkVersion" value="22" /> <preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="29" /> <preference name="android-targetSdkVersion" value="29" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
......
...@@ -89,11 +89,11 @@ ...@@ -89,11 +89,11 @@
}, },
"devDependencies": { "devDependencies": {
"@ionic/cli": "^6.12.3", "@ionic/cli": "^6.12.3",
"@ionic/v1-toolkit": "^3.2.15", "@ionic/v1-toolkit": "3.2.15",
"@prantlf/gulp-jsonlint": "^2.4.0", "@prantlf/gulp-jsonlint": "^2.4.0",
"ansi-colors": "^4.1.1", "ansi-colors": "^4.1.1",
"cordova": "^10.0.0", "cordova": "^10.0.0",
"cordova-android": "^9.0.0", "cordova-android": "9.0.0",
"cordova-clipboard": "^1.3.0", "cordova-clipboard": "^1.3.0",
"cordova-ios": "^6.1.1", "cordova-ios": "^6.1.1",
"cordova-osx": "^6.0.0", "cordova-osx": "^6.0.0",
......
resources/ios/icon/icon-108@2x.png

41.3 KiB

resources/ios/splash/Default-1792h~iphone.png

71 KiB

resources/ios/splash/Default-2688h~iphone.png

128 KiB

resources/ios/splash/Default-Landscape-1792h~iphone.png

75.2 KiB

resources/ios/splash/Default-Landscape-2688h~iphone.png

131 KiB

...@@ -9,6 +9,8 @@ export PROJECT_DIR ...@@ -9,6 +9,8 @@ export PROJECT_DIR
# Preparing environment # Preparing environment
. "${PROJECT_DIR}/scripts/env-global.sh" . "${PROJECT_DIR}/scripts/env-global.sh"
BUILD_TOOLS_DIR="${ANDROID_SDK_ROOT}/build-tools/${ANDROID_SDK_VERSION}/"
if test -z "${CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL}"; then if test -z "${CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL}"; then
echo "ERROR: Missing Gradle distribution URL - please export env variable 'CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'" echo "ERROR: Missing Gradle distribution URL - please export env variable 'CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'"
fi fi
...@@ -28,7 +30,7 @@ if test -z "${JAVAC_PATH}"; then ...@@ -28,7 +30,7 @@ if test -z "${JAVAC_PATH}"; then
fi fi
# Prepare Android SDK tools # Prepare Android SDK tools
if ! test -d "${ANDROID_SDK_ROOT}/build-tools/${ANDROID_SDK_VERSION}" || ! test -d "${ANDROID_SDK_CLI_ROOT}/tools/bin"; then if ! test -d "${BUILD_TOOLS_DIR}" || ! test -d "${ANDROID_SDK_CLI_ROOT}/tools/bin"; then
. ${PROJECT_DIR}/scripts/install-android-sdk.sh . ${PROJECT_DIR}/scripts/install-android-sdk.sh
if test $? -ne 0; then if test $? -ne 0; then
echo "ERROR: Unable to install Android SDK Tools & CLI" echo "ERROR: Unable to install Android SDK Tools & CLI"
...@@ -83,6 +85,11 @@ if test $? -ne 0; then ...@@ -83,6 +85,11 @@ if test $? -ne 0; then
echo "ERROR: Check Cordova requirements failed" echo "ERROR: Check Cordova requirements failed"
fi fi
export PATH=${GRADLE_HOME}/bin:${PATH} # Add Gradle to path
PATH=${GRADLE_HOME}/bin:${PATH}
# Export useful variables
export PATH \
BUILD_TOOLS_DIR
echo "Android environment is ready!" echo "Android environment is ready!"
...@@ -24,7 +24,7 @@ NODEJS_VERSION=12 ...@@ -24,7 +24,7 @@ NODEJS_VERSION=12
#NODE_OPTIONS=--max-old-space-size=4096 #NODE_OPTIONS=--max-old-space-size=4096
ANDROID_NDK_VERSION=19.2.5345600 ANDROID_NDK_VERSION=19.2.5345600
ANDROID_SDK_VERSION=29.0.3 ANDROID_SDK_VERSION=21.1.1
ANDROID_SDK_CLI_VERSION=6858069 ANDROID_SDK_CLI_VERSION=6858069
ANDROID_SDK_ROOT="${HOME}/Android/Sdk" ANDROID_SDK_ROOT="${HOME}/Android/Sdk"
ANDROID_ALTERNATIVE_SDK_ROOT=/usr/lib/android-sdk ANDROID_ALTERNATIVE_SDK_ROOT=/usr/lib/android-sdk
......
...@@ -45,6 +45,7 @@ echo y | sdkmanager "extras;google;m2repository" "--sdk_root=${ANDROID_SDK_ROOT} ...@@ -45,6 +45,7 @@ echo y | sdkmanager "extras;google;m2repository" "--sdk_root=${ANDROID_SDK_ROOT}
# Install build tools # Install build tools
echo "Installing Android build-tools..." echo "Installing Android build-tools..."
echo y | sdkmanager "build-tools;21.1.1" --sdk_root=${ANDROID_SDK_ROOT} | tee -a sdkmanager.log
echo y | sdkmanager "build-tools;${ANDROID_SDK_VERSION}" --sdk_root=${ANDROID_SDK_ROOT} | tee -a sdkmanager.log echo y | sdkmanager "build-tools;${ANDROID_SDK_VERSION}" --sdk_root=${ANDROID_SDK_ROOT} | tee -a sdkmanager.log
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
......
...@@ -7,19 +7,19 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then ...@@ -7,19 +7,19 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then
export PROJECT_DIR export PROJECT_DIR
fi; fi;
# Default env (can be override in file <PROJECT>/.local/env.sh) # Default env variables (can be override in '.local/env.sh' file)
KEYSTORE_FILE=${PROJECT_DIR}/.local/android/Cesium.keystore KEYSTORE_FILE=${PROJECT_DIR}/.local/android/Cesium.keystore
KEY_ALIAS=Cesium KEY_ALIAS=Cesium
KEYSTORE_PWD= KEYSTORE_PWD=
APK_RELEASE_DIR=${PROJECT_DIR}/platforms/android/app/build/outputs/apk/release
APK_UNSIGNED_FILE=${APK_RELEASE_DIR}/app-release-unsigned.apk
APK_SIGNED_FILE=${APK_RELEASE_DIR}/app-release.apk
# Preparing Android environment # Preparing Android environment
. ${PROJECT_DIR}/scripts/env-android.sh source ${PROJECT_DIR}/scripts/env-android.sh
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
APK_UNSIGNED_FILE=${ANDROID_OUTPUT_APK_RELEASE}/app-release-unsigned.apk
APK_SIGNED_FILE=${ANDROID_OUTPUT_APK_RELEASE}/app-release.apk
cd ${PROJECT_DIR} cd ${PROJECT_DIR}
# Sign files # Sign files
......
...@@ -7,10 +7,18 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then ...@@ -7,10 +7,18 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then
export PROJECT_DIR export PROJECT_DIR
fi; fi;
# Default env variables (can be override in '.local/env.sh' file)
KEYSTORE_FILE=${PROJECT_DIR}/.local/Cesium.keystore
KEY_ALIAS=Cesium
KEY_PWD=
# Preparing Android environment # Preparing Android environment
source ${PROJECT_DIR}/scripts/env-android.sh source ${PROJECT_DIR}/scripts/env-android.sh
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
APK_UNSIGNED_FILE=${ANDROID_OUTPUT_APK_RELEASE}/app-release-unsigned.apk
APK_SIGNED_FILE=${ANDROID_OUTPUT_APK_RELEASE}/app-release.apk
cd ${PROJECT_DIR} cd ${PROJECT_DIR}
# Run the build # Run the build
...@@ -18,13 +26,6 @@ echo "Running cordova build..." ...@@ -18,13 +26,6 @@ echo "Running cordova build..."
ionic cordova build android --warning-mode=none --color --prod --release ionic cordova build android --warning-mode=none --color --prod --release
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
# Signature
KEYSTORE_FILE=${PROJECT_DIR}/.local/Cesium.keystore
KEY_ALIAS=Cesium
KEY_PWD=
APK_DIR=${PROJECT_DIR}/platforms/android/build/outputs/apk/release
APK_UNSIGNED_FILE=${APK_DIR}/android-release.apk
BUILD_TOOLS_DIR="${ANDROID_SDK_ROOT}/build-tools/28.*/"
if [[ ! -f "${APK_UNSIGNED_FILE}" ]]; then if [[ ! -f "${APK_UNSIGNED_FILE}" ]]; then
echo "APK file not found at: ${APK_UNSIGNED_FILE}" echo "APK file not found at: ${APK_UNSIGNED_FILE}"
...@@ -48,7 +49,7 @@ if [[ $? -ne 0 ]]; then ...@@ -48,7 +49,7 @@ if [[ $? -ne 0 ]]; then
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ${KEYSTORE_FILE} ${APK_UNSIGNED_FILE} Cesium jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ${KEYSTORE_FILE} ${APK_UNSIGNED_FILE} Cesium
BUILD_TOOLS_DIR="${ANDROID_SDK_ROOT}/build-tools/28.*/" BUILD_TOOLS_DIR="${ANDROID_SDK_ROOT}/build-tools/${ANDROID_SDK_VERSION}/"
cd ${BUILD_TOOLS_DIR} cd ${BUILD_TOOLS_DIR}
./zipalign -v 4 ${APK_UNSIGNED_FILE} ${APK_SIGNED_FILE} ./zipalign -v 4 ${APK_UNSIGNED_FILE} ${APK_SIGNED_FILE}
......
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=== ] 10% Installing Android SDK Build-Tools [=== ] 10% Downloading build-tools_r21.1.1-li [==== ] 10% Downloading build-tools_r21.1.1-li [==== ] 11% Downloading build-tools_r21.1.1-li [==== ] 12% Downloading build-tools_r21.1.1-li [===== ] 13% Downloading build-tools_r21.1.1-li [===== ] 14% Downloading build-tools_r21.1.1-li [===== ] 15% Downloading build-tools_r21.1.1-li [====== ] 15% Downloading build-tools_r21.1.1-li [====== ] 16% Downloading build-tools_r21.1.1-li [====== ] 17% Downloading build-tools_r21.1.1-li [======= ] 18% Downloading build-tools_r21.1.1-li [======= ] 19% Downloading build-tools_r21.1.1-li [======= ] 20% Downloading build-tools_r21.1.1-li [======== ] 20% Downloading build-tools_r21.1.1-li [======== ] 21% Downloading build-tools_r21.1.1-li [======== ] 22% Downloading build-tools_r21.1.1-li [========= ] 23% Downloading build-tools_r21.1.1-li [========= ] 24% Downloading build-tools_r21.1.1-li [========= ] 25% Downloading build-tools_r21.1.1-li [========== ] 25% Downloading build-tools_r21.1.1-li [========== ] 26% Downloading build-tools_r21.1.1-li [========== ] 27% Downloading build-tools_r21.1.1-li [=========== ] 28% Downloading build-tools_r21.1.1-li [=========== ] 29% Downloading build-tools_r21.1.1-li [=========== ] 30% Downloading build-tools_r21.1.1-li [============ ] 30% Downloading build-tools_r21.1.1-li [============ ] 31% Downloading build-tools_r21.1.1-li [============ ] 32% Downloading build-tools_r21.1.1-li [============ ] 33% Downloading build-tools_r21.1.1-li [============ ] 33% Unzipping... [============ ] 33% Unzipping... android-5.0/ [============ ] 33% Unzipping... android-5.0/NOTICE.tx [============= ] 33% Unzipping... android-5.0/NOTICE.tx [============= ] 33% Unzipping... android-5.0/jill.jar [============= ] 34% Unzipping... android-5.0/jill.jar [============= ] 34% Unzipping... android-5.0/libbcc.so [============= ] 35% Unzipping... android-5.0/libbcc.so [============= ] 35% Unzipping... android-5.0/llvm-rs-c [============= ] 35% Unzipping... android-5.0/mainDexCl [============= ] 35% Unzipping... android-5.0/dexdump [============== ] 35% Unzipping... android-5.0/dexdump [============== ] 35% Unzipping... android-5.0/jack.jar [============== ] 36% Unzipping... android-5.0/jack.jar [============== ] 37% Unzipping... android-5.0/jack.jar [=============== ] 38% Unzipping... android-5.0/jack.jar [=============== ] 39% Unzipping... android-5.0/jack.jar [=============== ] 40% Unzipping... android-5.0/jack.jar [================ ] 40% Unzipping... android-5.0/jack.jar [================ ] 40% Unzipping... android-5.0/aapt [================ ] 41% Unzipping... android-5.0/aapt [================ ] 41% Unzipping... android-5.0/lib/ [================ ] 41% Unzipping... android-5.0/lib/shrin [================ ] 41% Unzipping... android-5.0/lib/dx.ja [================ ] 41% Unzipping... android-5.0/libLLVM.s [================ ] 42% Unzipping... android-5.0/libLLVM.s [================= ] 43% Unzipping... android-5.0/libLLVM.s [================= ] 44% Unzipping... android-5.0/libLLVM.s [================= ] 45% Unzipping... android-5.0/libLLVM.s [================== ] 45% Unzipping... android-5.0/libLLVM.s [================== ] 46% Unzipping... android-5.0/libLLVM.s [================== ] 47% Unzipping... android-5.0/libLLVM.s [================== ] 47% Unzipping... android-5.0/libclang. [=================== ] 48% Unzipping... android-5.0/libclang. [=================== ] 49% Unzipping... android-5.0/libclang. [=================== ] 50% Unzipping... android-5.0/libclang. [==================== ] 50% Unzipping... android-5.0/libclang. [==================== ] 51% Unzipping... android-5.0/libclang. [==================== ] 51% Unzipping... android-5.0/zipalign [==================== ] 51% Unzipping... android-5.0/libc++.so [==================== ] 51% Unzipping... android-5.0/runtime.p [==================== ] 51% Unzipping... android-5.0/source.pr [==================== ] 51% Unzipping... android-5.0/dx [==================== ] 51% Unzipping... android-5.0/bcc_compa [==================== ] 51% Unzipping... android-5.0/libbcinfo [==================== ] 51% Unzipping... android-5.0/mainDexCl [==================== ] 51% Unzipping... android-5.0/renderscr [==================== ] 52% Unzipping... android-5.0/renderscr [===================== ] 53% Unzipping... android-5.0/renderscr [===================== ] 53% Unzipping... android-5.0/i686-linu [===================== ] 54% Unzipping... android-5.0/i686-linu [===================== ] 54% Unzipping... android-5.0/aidl [===================== ] 54% Unzipping... android-5.0/arm-linux [===================== ] 55% Unzipping... android-5.0/arm-linux [===================== ] 55% Unzipping... android-5.0/mipsel-li [=======================================] 100% Unzipping... android-5.0/mipsel-l
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=== ] 10% Computing updates... Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
Loading package information... Loading local repository... [ ] 3% Loading local repository... [ ] 3% Fetch remote repository... [= ] 3% Fetch remote repository... [= ] 4% Fetch remote repository... [= ] 5% Fetch remote repository... [== ] 5% Fetch remote repository... [== ] 6% Fetch remote repository... [== ] 7% Fetch remote repository... [== ] 8% Fetch remote repository... [== ] 8% Computing updates... [=== ] 8% Computing updates... [=== ] 10% Computing updates... [=======================================] 100% Computing updates...
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