[PR-27228] Upgrade Demo App target to Android 17 (API 37) - #16
Draft
dgtv wants to merge 2 commits into
Draft
Conversation
Google Play requires target API >= 36 by Aug 31, 2026. Target 37 (latest stable, June 2026) so the app also clears the Aug 2027 deadline. App module only: compileSdk/targetSdk 35 -> 37, versionCode 4. The SDK library's public contract is unchanged (compileSdk 35, minSdk 16, v0.5.14) since the Play policy applies only to the uploaded app binary. Toolchain cascade required by compileSdk 37: AGP 8.5.2 -> 9.3.0, Gradle 8.7 -> 9.5.0, build-tools 37.0.0, unmock 0.7.8 -> 0.11.0, Groovy DSL migration (AGP 9 removed the old names; '=' assignment replaces the Gradle-10-removed space syntax), buildFeatures.buildConfig replaces the removed gradle.properties flag, CI image bump, jitpack.yml pins JDK 17 so JitPack tag builds survive Gradle 9.
- AGP 9 rejects getDefaultProguardFile('proguard-android.txt'); switch
both modules to proguard-android-optimize.txt (inert while
minifyEnabled = false).
- SDK unit tests: PowerMock 1.6.6/Mockito 1.10.19 cannot run on
JDK 17+ (module encapsulation), broken since CI dropped the Java 8
pin. Upgrade to PowerMock 2.0.9 / Mockito 2.28.2 (test-only deps)
and open the JDK modules the mocking stack and OkHttp reflect into.
Full :sdk:test suite passes on JDK 21 with Gradle 9.5/AGP 9.3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Google Play requires apps to target API 36+ by Aug 31, 2026 (target API level policy). This PR targets API 37 (Android 17, the latest stable release) instead of the minimum 36, so the app also clears the next annual deadline without another bump.
What changed
The actual requirement (app module only):
app_target_sdk/app_compile_sdk: 35 → 37;app_version_code3 → 4, versionName 1.0.1SDK library — public contract unchanged: compileSdk/targetSdk 35, minSdk 16, version 0.5.14. The Play policy applies only to the uploaded app binary, and the SDK keeps its documented Android 4.1+ support, so no SDK release is part of this PR.
Toolchain cascade forced by compileSdk 37 (per the AGP compatibility table it needs AGP ≥ 9.1.1):
compileSdkVersion/minSdkVersion/targetSdkVersion;=assignments replace the space syntax Gradle 10 removes; librarytargetSdkmoved totestOptions(AGP 9 requirement)buildFeatures { buildConfig = true }insdkreplaces the removedandroid.defaults.buildfeatures.buildconfigflag; droppedandroid.enableJetifier(all deps are AndroidX)cimg/android:2026.07.1(JDK 21, SDK 37 preinstalled); removed-in-AGP-9androidDependenciestask replaced with:sdk:dependencies :app:dependenciesproguard-android-optimize.txtreplacesproguard-android.txtin both modules — AGP 9 rejects the old default file (inert whileminifyEnabled = false)--add-openstest JVM args — the old stack cannot run on JDK 17+ (broken since CI dropped the Java 8 pin); full:sdk:testpasses on JDK 21 with this toolchainjitpack.ymlpinning JDK 17 — JitPack's default JDK 8 can't run Gradle 9, which would have broken the next tagged release buildDraft until
:sdk:testverified locally on JDK 21 / Gradle 9.5 / AGP 9.3 / SDK 37)