Repository navigation
build(compose): [AGP New DSL 1] Move sentry-compose to the KMP Android library plugin - #6642
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
KMP modules can't combine org.jetbrains.kotlin.multiplatform with com.android.library once AGP's built-in Kotlin is on, which the new AGP DSL needs. sentry-compose now uses com.android.kotlin.multiplatform.library. The Kotlin Gradle plugin's ABI validation skips the new Android target, so build-logic dumps it with the same abi-tools and hooks into checkKotlinAbi and updateKotlinAbi. The JDK target, Robolectric and CodeQL conventions learn the new plugin, lint needs com.android.lint, and detekt's test excludes gain the androidHostTest source set. The plugin has no BuildConfig, so the version comes from a generated internal constant and io.sentry.compose.BuildConfig is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 9 tasks
📲 Install BuildsAndroid
|
This was referenced Nov 18, 2026
This branch has not been deployed
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.
PR Stack (AGP New DSL)
📜 Description
Moves sentry-compose from
org.jetbrains.kotlin.multiplatform+com.android.librarytocom.android.kotlin.multiplatform.library, the only KMP setup AGP allows once built-in Kotlin is on.api/androidstale and only checkdesktop.KmpAndroidAbiValidation.ktdumps that target with the sameorg.jetbrains.kotlin:abi-toolsKGP uses, writes it to the same file, and hooks intocheckKotlinAbiandupdateKotlinAbi. The new dump is byte-identical to the old one, apart fromBuildConfig.BuildConfigis gone. The plugin doesn't support it, soVERSION_NAMEnow comes from a generatedinternal const. This removes the publicio.sentry.compose.BuildConfigclass, whose fields were AGP's generated defaults.com.android.librarynow handle the new plugin too: the Java 8 / JDK 21 test targets,minCompileSdk,verifyMethodParameters, the Robolectric jar prefetch andbuildForCodeQL. Without this they would have skipped sentry-compose silently.com.android.lintapplied, which also lints the desktop target now.androidHostTestsource set, run bytestAndroidHostTest. detekt's default test excludes predate that name, sodetekt.ymladds it to the 15 rules that exclude test sources.💡 Motivation and Context
First step toward dropping
android.builtInKotlin=falseandandroid.newDsl=false, which AGP 10 removes.Part of JAVA-651 and #5782: built-in Kotlin rejects the old KMP +
com.android.librarysetup.💚 How did you test it?
:sentry-compose:check(tests, lint, detekt, ABI, method parameters) on AGP 9.5.1 and 9.0.0, the ends of the AGP matrix.sentry-compose,-androidand-desktopartifacts withmain. They have the same files, and the AAR's manifest, keep rules, R.txt, public.txt and AAR metadata are identical. The class list differs only inBuildConfig→SentryComposeVersionKt. The bytecode is still Java 8. The.modulefile renames the variants fromrelease*toandroid*and adds theaarlibrary-elements attribute. The POM and.modulelose KGP's exclusions of the oldkotlin-*-commonartifacts.:sentry-samples-android:assembleDebug, which depends on sentry-compose.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Built-in Kotlin and the new DSL land on 9.x.x in #6653, because built-in Kotlin needs the SDK to target Java 11.
🤖 Generated with Claude Code
#skip-changelog