diff --git a/config.xml b/config.xml index 29630777d73367471c96d35c632c5f50902ae7f6..f980259d04ebede82c46cf9ad20a668fed8e42d5 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ <?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> <description> An simple App for Duniter wallet @@ -58,7 +58,7 @@ <platform name="android"> <preference name="AndroidXEnabled" value="true" /> <preference name="AndroidLaunchMode" value="singleTask" /> - <preference name="android-minSdkVersion" value="22" /> + <preference name="android-minSdkVersion" value="19" /> <preference name="android-targetSdkVersion" value="29" /> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /> diff --git a/package.json b/package.json index 69d288de5ab666ac81e3b54eeb8d19cfca619259..73782d35dac58d982261e6be105567dbed96e9e8 100644 --- a/package.json +++ b/package.json @@ -89,11 +89,11 @@ }, "devDependencies": { "@ionic/cli": "^6.12.3", - "@ionic/v1-toolkit": "^3.2.15", + "@ionic/v1-toolkit": "3.2.15", "@prantlf/gulp-jsonlint": "^2.4.0", "ansi-colors": "^4.1.1", "cordova": "^10.0.0", - "cordova-android": "^9.0.0", + "cordova-android": "9.0.0", "cordova-clipboard": "^1.3.0", "cordova-ios": "^6.1.1", "cordova-osx": "^6.0.0", diff --git a/resources/ios/icon/icon-108@2x.png b/resources/ios/icon/icon-108@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..79a143a560c3a8909de3f6aaf69ec73c14d232c4 Binary files /dev/null and b/resources/ios/icon/icon-108@2x.png differ diff --git a/resources/ios/splash/Default-1792h~iphone.png b/resources/ios/splash/Default-1792h~iphone.png new file mode 100644 index 0000000000000000000000000000000000000000..7d9839971ca50c3ed98f712e699c4d64cd311ba8 Binary files /dev/null and b/resources/ios/splash/Default-1792h~iphone.png differ diff --git a/resources/ios/splash/Default-2688h~iphone.png b/resources/ios/splash/Default-2688h~iphone.png new file mode 100644 index 0000000000000000000000000000000000000000..4fb9cde81930aaee9d41b16fb6deef76d57e4c42 Binary files /dev/null and b/resources/ios/splash/Default-2688h~iphone.png differ diff --git a/resources/ios/splash/Default-Landscape-1792h~iphone.png b/resources/ios/splash/Default-Landscape-1792h~iphone.png new file mode 100644 index 0000000000000000000000000000000000000000..538dd1b92cace6f08b3b488cf402f7249e331754 Binary files /dev/null and b/resources/ios/splash/Default-Landscape-1792h~iphone.png differ diff --git a/resources/ios/splash/Default-Landscape-2688h~iphone.png b/resources/ios/splash/Default-Landscape-2688h~iphone.png new file mode 100644 index 0000000000000000000000000000000000000000..9d2a42423e8c693aea0c8747e42f13d49815ad37 Binary files /dev/null and b/resources/ios/splash/Default-Landscape-2688h~iphone.png differ diff --git a/scripts/env-android.sh b/scripts/env-android.sh index 45aa21708f1344e4058c234b819b36b32da4fba3..5cd1d76bce6538ae1d02a560384096d89855a5bc 100755 --- a/scripts/env-android.sh +++ b/scripts/env-android.sh @@ -9,6 +9,8 @@ export PROJECT_DIR # Preparing environment . "${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 echo "ERROR: Missing Gradle distribution URL - please export env variable 'CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'" fi @@ -28,7 +30,7 @@ if test -z "${JAVAC_PATH}"; then fi # 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 if test $? -ne 0; then echo "ERROR: Unable to install Android SDK Tools & CLI" @@ -83,6 +85,11 @@ if test $? -ne 0; then echo "ERROR: Check Cordova requirements failed" 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!" diff --git a/scripts/env-global.sh b/scripts/env-global.sh index 9614edf730e13ec5967e8dfb82a19b1bace9e509..ff7ef297fb2a80cfc4b5a18faa54b0832c2138b7 100755 --- a/scripts/env-global.sh +++ b/scripts/env-global.sh @@ -24,7 +24,7 @@ NODEJS_VERSION=12 #NODE_OPTIONS=--max-old-space-size=4096 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_ROOT="${HOME}/Android/Sdk" ANDROID_ALTERNATIVE_SDK_ROOT=/usr/lib/android-sdk diff --git a/scripts/install-android-sdk.sh b/scripts/install-android-sdk.sh index a7de3f5ff8d4c14a78c186726c070a70a57d8461..8b5ea6be4ed21bceb2fce3dba0cb5f339746a5dc 100755 --- a/scripts/install-android-sdk.sh +++ b/scripts/install-android-sdk.sh @@ -45,6 +45,7 @@ echo y | sdkmanager "extras;google;m2repository" "--sdk_root=${ANDROID_SDK_ROOT} # Install 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 [[ $? -ne 0 ]] && exit 1 diff --git a/scripts/release-android-sign.sh b/scripts/release-android-sign.sh index 1bccacbca79fe89abe68b70d2ebdb30129d47eac..06c37ee971965128424fbe2ccf88a7365a8bd1e4 100755 --- a/scripts/release-android-sign.sh +++ b/scripts/release-android-sign.sh @@ -7,19 +7,19 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then export PROJECT_DIR 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 KEY_ALIAS=Cesium 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 -. ${PROJECT_DIR}/scripts/env-android.sh +source ${PROJECT_DIR}/scripts/env-android.sh [[ $? -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} # Sign files diff --git a/scripts/release-android.sh b/scripts/release-android.sh index 6631bc2fd0c4f39787d8be90f39f0b2864d207ab..8147321e3a40b3820a5999358bd6c98f5508dfc5 100755 --- a/scripts/release-android.sh +++ b/scripts/release-android.sh @@ -7,10 +7,18 @@ if [[ "_" == "_${PROJECT_DIR}" ]]; then export PROJECT_DIR 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 source ${PROJECT_DIR}/scripts/env-android.sh [[ $? -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} # Run the build @@ -18,13 +26,6 @@ echo "Running cordova build..." ionic cordova build android --warning-mode=none --color --prod --release [[ $? -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 echo "APK file not found at: ${APK_UNSIGNED_FILE}" @@ -48,7 +49,7 @@ if [[ $? -ne 0 ]]; then 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} ./zipalign -v 4 ${APK_UNSIGNED_FILE} ${APK_SIGNED_FILE} diff --git a/scripts/sdkmanager.log b/scripts/sdkmanager.log new file mode 100644 index 0000000000000000000000000000000000000000..4c9f8c1b91068bfda7ff7ee05ad4a67f85261b89 --- /dev/null +++ b/scripts/sdkmanager.log @@ -0,0 +1,12 @@ +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...