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

[enh] Release android now call other script to sign APK file

parent ee82d8bd
No related branches found
No related tags found
No related merge requests found
Pipeline #11375 failed
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<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"> <widget android-versionCode="106120" 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">
<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="19" /> <preference name="android-minSdkVersion" value="22" />
<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",
...@@ -223,4 +223,4 @@ ...@@ -223,4 +223,4 @@
"node": ">= 12.18.3", "node": ">= 12.18.3",
"yarn": ">= 1.22.0" "yarn": ">= 1.22.0"
} }
} }
\ No newline at end of file
...@@ -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=21.1.1 ANDROID_SDK_VERSION=29.0.3
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
......
...@@ -17,7 +17,6 @@ source ${PROJECT_DIR}/scripts/env-android.sh ...@@ -17,7 +17,6 @@ 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_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}
...@@ -32,34 +31,6 @@ if [[ ! -f "${APK_UNSIGNED_FILE}" ]]; then ...@@ -32,34 +31,6 @@ if [[ ! -f "${APK_UNSIGNED_FILE}" ]]; then
exit 1 exit 1
fi fi
# Check if signed # Sign APK file
cd ${BUILD_TOOLS_DIR} . ./script/release-android-sign.sh
./apksigner verify ${APK_UNSIGNED_FILE} [[ $? -ne 0 ]] && exit 1
# Not signed ? Do it !
if [[ $? -ne 0 ]]; then
echo "It seems that the APK file ${APK_UNSIGNED_FILE} is not signed !"
if [[ ! -f "${KEYSTORE_FILE}" ]]; then
echo "ERROR: Unable to sign: no keystore file found at ${KEYSTORE_FILE} !"
exit 1
fi
echo "Signing APK file ${APK_UNSIGNED_FILE}..."
APK_SIGNED_FILE=${APK_DIR}/android-release-signed.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ${KEYSTORE_FILE} ${APK_UNSIGNED_FILE} Cesium
BUILD_TOOLS_DIR="${ANDROID_SDK_ROOT}/build-tools/${ANDROID_SDK_VERSION}/"
cd ${BUILD_TOOLS_DIR}
./zipalign -v 4 ${APK_UNSIGNED_FILE} ${APK_SIGNED_FILE}
./apksigner verify ${APK_SIGNED_FILE}
if [[ $? -ne 0 ]]; then
echo "Signing failed !"
exit 1
fi
# Do file replacement
rm ${APK_UNSIGNED_FILE}
mv ${APK_SIGNED_FILE} ${APK_UNSIGNED_FILE}
fi
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
"BLOCKS_ISSUERS_TITLE": "Nombre de blocs calculés par membre", "BLOCKS_ISSUERS_TITLE": "Nombre de blocs calculés par membre",
"BLOCKS_ISSUERS_LABEL": "Nombre de blocs", "BLOCKS_ISSUERS_LABEL": "Nombre de blocs",
"TX_DIVIDER": "Analyse des transactions", "TX_DIVIDER": "Analyse des transactions",
"TX_AMOUNT_TITLE": "Volume des transactions", "TX_AMOUNT_TITLE": "Volume des transactions {{currency|abbreviate}}",
"TX_AMOUNT_PUBKEY_TITLE": "Volume des transactions calculées par {{issuer | formatPubkey}}", "TX_AMOUNT_PUBKEY_TITLE": "Volume des transactions calculées par {{issuer | formatPubkey}}",
"TX_AMOUNT_LABEL": "Volume échangé", "TX_AMOUNT_LABEL": "Volume échangé",
"TX_COUNT_TITLE": "Nombre de transactions écrites", "TX_COUNT_TITLE": "Nombre de transactions écrites",
......
This diff is collapsed.
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