fix(build): pin material group version after BOM exclusion

The global compose-bom exclusion strips versions from transitive
androidx.compose.material deps (maps-compose-widgets, datadog).
Add an explicit resolution strategy to pin the material group to 1.7.8
and consolidate the version ref in the catalog.
This commit is contained in:
James Rich 2026-04-13 06:44:41 -05:00
parent 5f31efb45b
commit 9ae66113f3
2 changed files with 10 additions and 1 deletions

View file

@ -42,10 +42,18 @@ internal fun Project.configureAndroidCompose(commonExtension: CommonExtension) {
"androidx.compose.runtime",
"androidx.compose.ui",
)
// The BOM exclusion above strips versions from transitive material deps
// (e.g. maps-compose-widgets, datadog). Pin the material group to the
// AndroidX version that matches this CMP release.
val materialVersion = libs.version("androidx-compose-material")
configurations.configureEach {
resolutionStrategy.eachDependency {
if (requested.group in cmpAlignedGroups) {
useVersion(cmpVersion)
} else if (requested.group == "androidx.compose.material") {
useVersion(materialVersion)
}
}
}

View file

@ -36,6 +36,7 @@ turbine = "1.2.1"
# Compose Multiplatform
compose-multiplatform = "1.11.0-beta02"
compose-multiplatform-material3 = "1.11.0-alpha06"
androidx-compose-material = "1.7.8"
jetbrains-adaptive = "1.3.0-alpha06"
# Google
@ -118,7 +119,7 @@ androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version
androidx-work-testing = { module = "androidx.work:work-testing", version = "2.11.2" }
# AndroidX Compose (explicit versions — BOM removed; CMP is the sole version authority)
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended", version = "1.7.8" } # Only used by deprecated mesh_service_example — remove when that module is deleted
androidx-compose-material-iconsExtended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidx-compose-material" } # Only used by deprecated mesh_service_example — remove when that module is deleted
androidx-compose-runtime-tracing = { module = "androidx.compose.runtime:runtime-tracing", version.ref = "compose-multiplatform" }
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose-multiplatform" } # Required by Robolectric Compose tests (registers ComponentActivity)