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'?>
<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>
<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="19" />
<preference name="android-minSdkVersion" value="22" />
<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" />
......
......@@ -24,7 +24,7 @@ NODEJS_VERSION=12
#NODE_OPTIONS=--max-old-space-size=4096
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_ROOT="${HOME}/Android/Sdk"
ANDROID_ALTERNATIVE_SDK_ROOT=/usr/lib/android-sdk
......
......@@ -17,7 +17,6 @@ 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}
......@@ -32,34 +31,6 @@ if [[ ! -f "${APK_UNSIGNED_FILE}" ]]; then
exit 1
fi
# Check if signed
cd ${BUILD_TOOLS_DIR}
./apksigner verify ${APK_UNSIGNED_FILE}
# 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
# Sign APK file
. ./script/release-android-sign.sh
[[ $? -ne 0 ]] && exit 1
......@@ -53,7 +53,7 @@
"BLOCKS_ISSUERS_TITLE": "Nombre de blocs calculés par membre",
"BLOCKS_ISSUERS_LABEL": "Nombre de blocs",
"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_LABEL": "Volume échangé",
"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.
Please register or to comment