R8 has broken release APKs here before by stripping the JNI-loaded player and security classes, and the only way to reproduce that was to build with the real signing key and clobber the install you actually use. `./scripts/build-and-deploy.sh release --device --debug` now builds a fully minified release APK — exactly what ships — into the .debug applicationId slot, signed with the local debug keystore: release com.dtourolle.jellytau 0.5.5 release --debug com.dtourolle.jellytau.debug 0.5.5-debug-release debug com.dtourolle.jellytau.debug 0.5.5-debug It shares the applicationId *and* the signature with the plain debug build, so the two replace each other cleanly rather than colliding, and the versionName suffix says which is currently installed. No real key is needed, so the side-by-side path deliberately skips write-keystore-properties.sh. The flag reaches Gradle as JT_SIDE_BY_SIDE=1. CI never sets it, and the release manifest merges byte-identical without it — verified both ways through processUniversalReleaseMainManifest. deploy-android.sh and build-and-deploy.sh learned the flag too, since the APK path is unchanged but the package to launch is not.
24 lines
632 B
Bash
Executable File
24 lines
632 B
Bash
Executable File
#!/bin/bash
|
|
# Build and deploy Android APK in one command
|
|
|
|
set -e
|
|
|
|
echo "🚀 Build and Deploy Android APK"
|
|
echo ""
|
|
|
|
# Pass all args (build type and/or --clean) through to the build script.
|
|
./scripts/build-android.sh "$@"
|
|
|
|
echo ""
|
|
|
|
# Deploy APK — forward the build type and the side-by-side flag (which decides
|
|
# which package to launch), ignoring build-only flags like --clean and --device.
|
|
DEPLOY_ARGS=("debug")
|
|
for arg in "$@"; do
|
|
case "$arg" in
|
|
debug|release) DEPLOY_ARGS[0]="$arg" ;;
|
|
--debug|--side-by-side) DEPLOY_ARGS+=("--side-by-side") ;;
|
|
esac
|
|
done
|
|
./scripts/deploy-android.sh "${DEPLOY_ARGS[@]}"
|