Repository navigation
Conversation
📲 Install BuildsAndroid
|
Gradle resolves version conflicts per module, so a build could mix SDK modules of different versions, for example a newer sentry-android-core with an older sentry-android-fragment that the Gradle plugin or another library pulled in. That fails at runtime with NoSuchMethodError or the mixed versions check. The publish conventions now add sentry-bom as a platform to every published library module. Gradle then moves all SDK modules of a consumer to the highest version present. Maven does not apply the dependencyManagement of a dependency's POM, so Maven builds resolve as before. The BOM now also constrains sentry-android-distribution, which is released with the SDK. Refs #5105 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
romtsn
force-pushed
the
build/align-modules-via-bom
branch
from
November 5, 2026 11:29
eda7a13 to
7847a46
Compare
romtsn
changed the base branch from
main
to
refactor/apply-plugins-per-module
November 5, 2026 11:29
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.
📜 Description
Every published SDK module now depends on
sentry-bomas a platform. In Gradle builds, this makes all Sentry modules of a consumer resolve to one version: the highest one present. Today, Gradle resolves each module on its own, so a build can mix versions.For example, a new
sentry-android-corewith ansentry-android-fragmentthat the Gradle plugin or another library pulled in:How it is wired:
io.sentry.publishadds it forjava-libraryand Android library modules, andio.sentry.publish.multiplatformadds it tocommonMainApi.java-platformprojects, so they never depend on themselves.sentry-bomnow also constrainssentry-android-distribution, which is released with the SDK. Before, it was left out.The published metadata changes like this:
.module: asentry-bomdependency withorg.gradle.category: platform..pom: asentry-bomimportin<dependencyManagement>. Maven does not apply a dependency's<dependencyManagement>to the consumer, so Maven builds resolve as before. Maven users keep importing the BOM themselves.The BOM only contains constraints, so the module → BOM → module edge is not a resolution cycle. Jackson and kotlinx publish their modules the same way.
💡 Motivation and Context
Mixed module versions keep causing runtime crashes:
NoSuchMethodError,ClassNotFoundException, or the "mix of versions" check from #4277. These come from the Gradle plugin's auto-installation, from hybrid SDKs, or from third-party libraries that pull in a differentsentry-android. Examples:The new
sentry-android-ndk-outprocmodule (#6347) makes this worse. It calls internalsentry-android-coreAPIs, and it registers its package only after the mixed versions check has run, so a mismatch would show up while a native crash is being processed.Alignment only starts once a build contains at least one module from a release with this change. Builds with only older artifacts behave as before.
💚 How did you test it?
sentry-android-distribution.sentry-opentelemetry-bomgets no platform dependency.spotlessApply updateKotlinAbiproduces no.apichanges.8.99.0-alignand checked the.moduleand.pomof a JVM module, an Android module,sentry-android-distribution, the KMP Android variant, the shaded OpenTelemetry agent (correctly no platform dependency) and both BOMs.sentry-bomhas 58 constraints and no dependency on itself.8.99.0-alignwith released8.50.0artifacts:sentrywith oldsentry-logback:sentry-logbackmoves to 8.99.0-align;sentry-logbackwith oldsentryand oldsentry-okhttp: both move up;sentry-android-coreand oldsentry-android-fragment(AGP 9.4): the fragment module moves up;dependency:treepasses with no warnings, the BOM import resolves, and versions follow Maven's usual "nearest wins" rule, as before.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
sentry-androidnow moves up with it, instead of staying behind and failing the mixed versions check. Apps that use local AAR files (Unity, Unreal) are not affected.🤖 Generated with Claude Code