Repository navigation
chore: pin compileSdk to 36 to keep consumers off AGP 9 - #3498
Merged
Merged
Conversation
From AGP 9 a library's published AAR metadata carries minCompileSdk equal to its own compileSdk, where AGP 8 published 1. compileSdk 37 therefore makes every consumer below 37 fail checkReleaseAarMetadata, and compileSdk 37 is only reachable on AGP 9 — so the last release would have required consumers to migrate. Only okhttp-android 5.5.0 needs compileSdk 37; it comes in transitively with okhttp 5.5.0 and is held at 5.4.0. Nothing else on the graph asks for more than 36. AGP itself stays at 9.4.1: it builds against 36 without complaint, so this costs none of the toolchain upgrade. Verified with a consumer on AGP 8.11.1 at compileSdk 36 compiling against the published artifacts, which fails before this change and passes after.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3498 +/- ##
==========================================
+ Coverage 57.65% 57.76% +0.11%
==========================================
Files 1128 1129 +1
Lines 33198 33268 +70
Branches 4949 4961 +12
==========================================
+ Hits 19140 19217 +77
+ Misses 12130 12123 -7
Partials 1928 1928 🚀 New features to boost your workflow:
|
VarshithaPamisetty
approved these changes
Oct 23, 2026
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.
Issue #, if available:
Description of changes:
From AGP 9 a library's published AAR metadata carries
minCompileSdkequal to its owncompileSdk, where AGP 8 published1. Comparing the metadata insidecore:minCompileSdk137So compileSdk 37 now makes every consumer below 37 fail
checkReleaseAarMetadata, and compileSdk 37 is only reachable on AGP 9. Releasing as-is would require consumers to migrate to AGP 9 — this pins compileSdk back to 36 so that migration can be its own, later release.Only one dependency actually needs compileSdk 37:
okhttp-android5.5.0, which arrives transitively withokhttp5.5.0 and is held here at 5.4.0 (minCompileSdk=36). Nothing else on the graph asks for more than 36, and already-released 2.42.0 shipsandroidx.browser1.10.0, so compileSdk 36 / AGP 8.9.1 is the floor consumers are on today — this release raises nothing.AGP itself stays at 9.4.1, which builds against 36 without complaint, so none of the toolchain upgrade is given back.
Dependency updates that are deferred to a follow-up release for the same reason:
okhttp5.5.0androidx.core1.19.x, which declaresminCompileSdk=37andminAndroidGradlePluginVersion=9.1.0, so it is a hard AGP 9 requirement for consumers. 1.18.0 is the last version at 36. The other bumps grouped with it are all at 35 or below and are unaffected.How did you test these changes?
./gradlew buildcovers compilation, Lint, ktlint, apiCheck, Kover and unit tests across every module. It reports the same fourlicenseefailures as unmodifiedmain(sqlcipher4.19.1's license URL and a BSD-3-Clause artifact fromfirebase-bom35.0.0 are not in the allowlist); everything else passes.Verified the consumer-facing effect directly: a standalone Android library on AGP 8.11.1 at compileSdk 36, depending on every published Amplify artifact from
mavenLocaland compiling againstAmplifyplus the Auth/API/Storage/DataStore/Analytics plugins. It failscheckReleaseAarMetadataagainst the compileSdk 37 artifacts and builds successfully against these. All published AARs, including the KMPfoundation-android, now declareminCompileSdk=36.Documentation update required?
General Checklist
fix(storage): message,feat(auth): message,chore(all): message)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.