Skip to content

build(android): Adopt AGP built-in Kotlin and the new DSL on 9.x.x - #6653

Draft
runningcode wants to merge 1 commit into
9.x.xfrom
no/agp-new-dsl-9
Draft

runningcode wants to merge 1 commit into
9.x.xfrom
no/agp-new-dsl-9

Conversation

@runningcode

@runningcode runningcode commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (AGP New DSL 9.x.x)


📜 Description

Collection branch for moving the 9.x.x build off the AGP 9 opt-outs android.builtInKotlin=false and android.newDsl=false. AGP 10 removes both.

The stack has two steps:

  1. Switch to AGP's built-in Kotlin, dropping org.jetbrains.kotlin.android.
  2. Drop android.newDsl=false.

It targets 9.x.x rather than main because built-in Kotlin compiles unit tests for the same JVM target as the main code. main publishes Java 8 bytecode, while test dependencies such as mockito-kotlin 6 are Java 11, and Kotlin can't inline Java 11 bytecode into Java 8 code. 9.x.x already publishes Java 11.

It builds on #6642 (moving sentry-compose to the KMP Android library plugin), which is in the main stack (#6641). Until #6642 merges and syncs into 9.x.x, the first stack PR carries a cherry-pick of it.

💡 Motivation and Context

The android.builtInKotlin=false and android.newDsl=false opt-outs go away in AGP 10.

The stack PRs resolve #5782 / JAVA-651 (built-in Kotlin) and #5781 / JAVA-650 (new DSL).

💚 How did you test it?

See the individual stack PRs.

📝 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

Squash-merge this into 9.x.x once every stack PR has been merged into it.

🤖 Generated with Claude Code

#skip-changelog

@sentry

sentry Bot commented Nov 18, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
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.

1 participant