build(android): Pin AAR minCompileSdk to minSdk#5823
Merged
Conversation
AGP 9 changed the default so a published library's AAR metadata minCompileSdk mirrors its compileSdk, which we recently bumped to 37. That would force every consumer of the Android SDK onto compileSdk 37. Pin minCompileSdk to our minSdk for all published Android library modules so consumers stay free to compile against any SDK we support, preserving the pre-AGP-9 behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
runningcode
marked this pull request as ready for review
July 23, 2026 08:02
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
July 23, 2026 08:02
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/aar-min-compile-sdk
branch
from
July 23, 2026 08:31
d2470a8 to
864b750
Compare
runningcode
enabled auto-merge (squash)
July 23, 2026 08:33
This was referenced Jul 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.
📜 Description
Pin the AAR metadata
minCompileSdkto ourminSdkfor all published Android library modules, set centrally in the sharedcom.android.libraryconfiguration in the rootbuild.gradle.kts.💡 Motivation and Context
AGP 9.0 changed the default so that a published library's AAR metadata
minCompileSdkmirrors itscompileSdk, requiring consumers to compile against the same or higher SDK. Since we recently bumpedcompileSdkto 37, this default would force every consumer of the Android SDK ontocompileSdk 37.Pinning
minCompileSdkto ourminSdkkeeps consumers free to compile against any SDK we support, preserving the pre-AGP-9 behavior.💚 How did you test it?
Verified that
writeReleaseAarMetadatanow emitsminCompileSdk=21for the published Android library modules (sentry-android-core,sentry-android-ndk,sentry-android-replay,sentry-compose).📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps