[orgzly] Fix installing debug signed release

This commit is contained in:
Charlotte Van Petegem 2023-05-15 18:59:04 +02:00
parent a2dc92cade
commit 17d9be5ea0
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -19,7 +19,7 @@ in
env = [ env = [
{ name = "ANDROID_SDK_ROOT"; eval = "${composed.androidsdk}/libexec/android-sdk/"; } { name = "ANDROID_SDK_ROOT"; eval = "${composed.androidsdk}/libexec/android-sdk/"; }
{ name = "BUILD_TOOLS_PATH"; eval = "$ANDROID_SDK_ROOT/build-tools/${buildToolsVersion}"; } { name = "BUILD_TOOLS_PATH"; eval = "$ANDROID_SDK_ROOT/build-tools/${buildToolsVersion}"; }
{ name = "APK_DIR"; eval = "$PRJ_ROOT/app/build/outputs/apk/release"; } { name = "APK_DIR"; eval = "$PRJ_ROOT/app/build/outputs/apk/premium/release"; }
]; ];
commands = [ commands = [
{ {
@ -35,7 +35,7 @@ in
command = '' command = ''
rm -f "$APK_DIR/"* rm -f "$APK_DIR/"*
gradle assembleRelease gradle assembleRelease
"$BUILD_TOOLS_PATH/zipalign" -v -p 4 "$APK_DIR/app-release-unsigned.apk" "$APK_DIR/app-release-unsigned-aligned.apk" "$BUILD_TOOLS_PATH/zipalign" -v -p 4 "$APK_DIR/app-premium-release-unsigned.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
echo android | "$BUILD_TOOLS_PATH/apksigner" sign --ks "$HOME/.android/debug.keystore" --out "$APK_DIR/app-release.apk" "$APK_DIR/app-release-unsigned-aligned.apk" echo android | "$BUILD_TOOLS_PATH/apksigner" sign --ks "$HOME/.android/debug.keystore" --out "$APK_DIR/app-release.apk" "$APK_DIR/app-release-unsigned-aligned.apk"
adb install -r "$APK_DIR/app-release.apk" adb install -r "$APK_DIR/app-release.apk"
''; '';