Skip to content

[PR-27228] Upgrade Demo App target to Android 17 (API 37) - #16

Draft
dgtv wants to merge 2 commits into
masterfrom
upgrade-api-37
Draft

[PR-27228] Upgrade Demo App target to Android 17 (API 37)#16
dgtv wants to merge 2 commits into
masterfrom
upgrade-api-37

Conversation

@dgtv

@dgtv dgtv commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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_code 3 → 4, versionName 1.0.1

SDK 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):

  • AGP 8.5.2 → 9.3.0, Gradle 8.7 → 9.5.0, build-tools 37.0.0, unmock plugin 0.7.8 → 0.11.0
  • Groovy DSL migration in both modules: AGP 9 removed compileSdkVersion/minSdkVersion/targetSdkVersion; = assignments replace the space syntax Gradle 10 removes; library targetSdk moved to testOptions (AGP 9 requirement)
  • buildFeatures { buildConfig = true } in sdk replaces the removed android.defaults.buildfeatures.buildconfig flag; dropped android.enableJetifier (all deps are AndroidX)
  • CircleCI image → cimg/android:2026.07.1 (JDK 21, SDK 37 preinstalled); removed-in-AGP-9 androidDependencies task replaced with :sdk:dependencies :app:dependencies
  • proguard-android-optimize.txt replaces proguard-android.txt in both modules — AGP 9 rejects the old default file (inert while minifyEnabled = false)
  • Test-only: PowerMock 1.6.6/Mockito 1.10.19 → PowerMock 2.0.9/Mockito 2.28.2 plus --add-opens test JVM args — the old stack cannot run on JDK 17+ (broken since CI dropped the Java 8 pin); full :sdk:test passes on JDK 21 with this toolchain
  • New jitpack.yml pinning JDK 17 — JitPack's default JDK 8 can't run Gradle 9, which would have broken the next tagged release build

Draft until

  • CI passes on this PR (build + :sdk:test verified locally on JDK 21 / Gradle 9.5 / AGP 9.3 / SDK 37)
  • Android Studio sync (requires Studio Panda 3+ for API 37)
  • Demo app pass on Android 17 — note targeting 36+ makes edge-to-edge mandatory, so check for UI drawing under system bars

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.
@dgtv
dgtv requested a review from zhuravel August 7, 2026 03:30
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant