diff --git a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/AndroidCompose.kt b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/AndroidCompose.kt index 2a3961c89..b438fe6c6 100644 --- a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/AndroidCompose.kt +++ b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/AndroidCompose.kt @@ -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) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dc9d0fe2d..52d30d1ea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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)