This message was deleted.
# community-support
s
This message was deleted.
v
You can use rich versions in the version catalog file too, so you can use the
strictly
there either in the long form or as
!!
suffix: https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
e
you could create your own platform that brings in both compose-bom and the upgraded material3 version
s
Yes using
version = { strictly = "1.1.0-alpha06" }
works perfectly fine! Couldn’t find a way to combine this with a
version.ref
, but not a big deal, it’s an exception anyway, won’t be doing this often. Thanks so much! When you say “create own platform”, I am unfortunately not sure I understand what you mean. Something like making my own BOM locally, which brings in compose-bom + that specific version? Care to elaborate?
e
documented at https://docs.gradle.org/current/userguide/java_platform_plugin.html,
Copy code
// platform/build.gradle.kts
plugins {
    `java-platform`
}

javaPlatform {
    allowDependencies()
}

dependencies {
    api(platform(libs.androidx.compose.bom))
    constraints {
        api(libs.androidx.compose.material3)
    }
}
then use
platform(projects.platform)
instead of
platform(libs.compose.bom)
v
Couldn’t find a way to combine this with a
version.ref
It's in the docs I linked you to. The rich version declaration is in the
version
section and you just use that in the
version.ref
as usual.
Or you do as @ephemient suggests 🙂
s
Yup I hadn’t realized you can use this rich syntax in the [versions] block too. That was my bad, thank you again for pointing this out to me. I think I will go with this approach as the platform approach seems like a bit extra steps, and I want to remove this workaround as soon as possible anyway, when the artifact I am interested in goes to stable again.
👌 1