diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62e1d28d..0f444c84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -215,6 +215,11 @@ jobs: for abi in armeabi-v7a arm64-v8a x86_64; do unzip -l "$apk" "lib/$abi/*" > /dev/null || { echo "::error::The APK has no lib/$abi - check RuntimeIdentifiers"; exit 1; } done + # Play automatic protection rejects a bundle whose minSdkVersion is below 24, and 0.7.0 + # only found out at the Play upload (#550). The .apk is rendered from the same bundle. + aapt2=$(ls -d "$ANDROID_HOME"/build-tools/*/aapt2 | sort -V | tail -n1) + min_sdk=$("$aapt2" dump badging "$apk" | sed -n "s/^\(minSdkVersion\|sdkVersion\):'\([0-9]*\)'$/\2/p") + test "${min_sdk:-0}" -ge 24 || { echo "::error::The APK has minSdkVersion '${min_sdk}', Play needs 24 - check SupportedOSPlatformVersion"; exit 1; } mkdir -p dist play cp "$apk" "dist/lagebuch-${VERSION}.apk" cp "$aab" "play/lagebuch-${VERSION}.aab" diff --git a/README.md b/README.md index 166c0a98..9b517c2c 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Betriebssystem beim ersten Start einmal: `dpkg -i`: das Paket deklariert seine Systemabhängigkeiten (ICU, fontconfig, X11-Bibliotheken), die nur `apt` auflöst. Falls doch `dpkg -i`: `sudo apt-get -f install` räumt auf. -- **Android** – ab Android 6.0 (API 23); `.apk` öffnen und die Installation +- **Android** – ab Android 7.0 (API 24); `.apk` öffnen und die Installation aus unbekannten Quellen für diese App einmal erlauben. Die Android-App ist ein Begleitgerät: sie verbindet sich mit einem Einsatz, der auf einem Laptop gehostet wird. diff --git a/changelog.d/+android-min-sdk-24.changed.md b/changelog.d/+android-min-sdk-24.changed.md new file mode 100644 index 00000000..6ebceb59 --- /dev/null +++ b/changelog.d/+android-min-sdk-24.changed.md @@ -0,0 +1 @@ +The Android app now requires Android 7.0 (API 24), the minimum Google Play accepts for a new release, so the 0.7 line can be published there (#550). diff --git a/src/LageBuch.App.Android/AndroidManifest.xml b/src/LageBuch.App.Android/AndroidManifest.xml index 6159e5cf..814156b4 100644 --- a/src/LageBuch.App.Android/AndroidManifest.xml +++ b/src/LageBuch.App.Android/AndroidManifest.xml @@ -4,9 +4,11 @@ -p:ApplicationVersion, -p:ApplicationDisplayVersion and $(ApplicationId) from the csproj and the release workflow. That is exactly what happened: every published APK up to and including lagebuch-0.6.0.apk reported versionName 0.1.0 / versionCode 1, whatever its tag said. The - csproj is the only source of truth; the tag feeds it through release.yml. --> + csproj is the only source of truth; the tag feeds it through release.yml. + minSdkVersion is absent for the same reason: $(SupportedOSPlatformVersion) sets it. Play + automatic protection refuses a bundle below API 24 (#550), and release.yml checks the floor. --> - + 1 0.0.0 - 23 + 24