Hello, is there a way to have a constraint on a bo...
# gradle
k
Hello, is there a way to have a constraint on a bom version in Gradle with Kotlin DSL?
v
You mean like
implementation(platform("coordinatesofthebom"))
?
k
Thanks for the response. I am using that already but a dependency is transitively bringing in another version of the bom.
e.g.
Copy code
dependencies {
   api(platform("foo:bar-bom:1.0"))
   dependency("abc:xyz:2.0") // where this is bringing in foo:bar-bom:2.0
}
e
enforcedPlatform
IIRC
v
No, that is seldomly the solution.
Also that would enforce the version within the BOM, not the BOM version
If you want to override the BOM version from the transitive dependency, you can for example use a
strict
version to enforce your choice.
k
Ok I will look into that, thanks!