Skip to content

build(android): Pin AAR minCompileSdk to minSdk#5823

Merged
runningcode merged 2 commits into
mainfrom
no/aar-min-compile-sdk
Jul 23, 2026
Merged

build(android): Pin AAR minCompileSdk to minSdk#5823
runningcode merged 2 commits into
mainfrom
no/aar-min-compile-sdk

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

Pin the AAR metadata minCompileSdk to our minSdk for all published Android library modules, set centrally in the shared com.android.library configuration in the root build.gradle.kts.

💡 Motivation and Context

AGP 9.0 changed the default so that a published library's AAR metadata minCompileSdk mirrors its compileSdk, requiring consumers to compile against the same or higher SDK. Since we recently bumped compileSdk to 37, this default would force every consumer of the Android SDK onto compileSdk 37.

Pinning minCompileSdk to our minSdk keeps consumers free to compile against any SDK we support, preserving the pre-AGP-9 behavior.

💚 How did you test it?

Verified that writeReleaseAarMetadata now emits minCompileSdk=21 for the published Android library modules (sentry-android-core, sentry-android-ndk, sentry-android-replay, sentry-compose).

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

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
runningcode marked this pull request as ready for review July 23, 2026 08:02

@markushi markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread CHANGELOG.md Outdated
@sentry

sentry Bot commented Jul 23, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.50.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode force-pushed the no/aar-min-compile-sdk branch from d2470a8 to 864b750 Compare July 23, 2026 08:31
@runningcode
runningcode enabled auto-merge (squash) July 23, 2026 08:33
@runningcode
runningcode merged commit 4670d89 into main Jul 23, 2026
67 of 70 checks passed
@runningcode
runningcode deleted the no/aar-min-compile-sdk branch July 23, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants