I have an android (compose) projet with a single libs.versions.toml for versions catalog.
In this .toml, I declare a compose BOM and some librairies as follow:
[versions]
ksp = "1.9.10-1.0.13"
...
androidxComposeBom = "2023.10.01"
[libraries]
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
...
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3"}
androidx-compose-material3-windowSizeClass = { group = "androidx.compose.material3", name = "material3-window-size-class" }
When I do this, I get an error on 'Failed to resolve: androidx.compose.material3:material3' and 'Failed to resolve: androidx.compose.material3:material3-window-size-class'.
I only get an error on material3 libs, not 'ui' or others that have their versions in the BOM
if I specify a version as follow, it works:
[versions]
material3VersionHack = "1.1.2"
[libraries]
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3VersionHack"}
BUT that defeat the purpose of the BOM: avoid specifying each version...
according to https://developer.android.com/jetpack/compose/bom/bom-mapping the material3 is defined with a 1.1.2 version for BOM 2023.10.01 so what?
=> Why do I need to specify the version manually for material3? is there a way to rely on version defined by the current BOM?