Skip to content

build: Replace deprecated AGP BaseExtension in JdkTargetConvention - #6406

Merged
runningcode merged 1 commit into
mainfrom
no/agp-library-dsl-extension
Oct 28, 2026
Merged

runningcode merged 1 commit into
mainfrom
no/agp-library-dsl-extension

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

JdkTargetConvention now looks up the Android library extension as com.android.build.api.dsl.LibraryExtension instead of the deprecated com.android.build.gradle.BaseExtension. The compileOptions and aarMetadata configuration is unchanged.

💡 Motivation and Context

Compiling build-logic printed two deprecation warnings:

'class BaseExtension : AndroidConfig, Lockable' is deprecated. Replaced by com.android.build.api.dsl.CommonExtension.
This class is not used for the public extensions in AGP when android.newDsl=true, which is the default in AGP 9.0, and will be removed in AGP 10.0.

The DSL LibraryExtension works with android.newDsl=false, which we set today, and keeps working once we flip it.

💚 How did you test it?

:build-logic:compileKotlin no longer prints the warnings, and sentry-android-core's generated aar-metadata.properties still has minCompileSdk=21.

📝 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.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

🤖 Generated with Claude Code

#skip-changelog

BaseExtension is deprecated in AGP 9 and removed in AGP 10, and it is
not the registered android extension once android.newDsl=true. The DSL
LibraryExtension exposes the same compileOptions and aarMetadata blocks
and works with both DSL modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sentry

sentry Bot commented Oct 28, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode marked this pull request as ready for review October 28, 2026 09:02
@runningcode
runningcode requested review from a team and adinauer as code owners October 28, 2026 09:02
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Oct 28, 2026
@runningcode
runningcode merged commit 8eee5d1 into main Oct 28, 2026
47 checks passed
@runningcode
runningcode deleted the no/agp-library-dsl-extension branch October 28, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants