Nebdir
(Jan Grigat)
November 10, 2022, 10:35am
1
Hey ther im trying to override a version declared as
[version]
a-b-foo-dev = "1.2.3"
ive read that the dashes doesnt matter, even thought i can replace them with dots.
but upon overrwriting the version in the settings.gradle.kts its not clear how its working.
create("libs"){
from("de.me.catalog:android:0.1.0")
version("a.b.foo.dev","1.2.8-dev.26")
}
other alias like a-b-foo-dev
not working also.
So whats the ideal way to clean this mess up?
Chris_Dore
(Chris Doré)
November 11, 2022, 7:34am
2
I used the version-catalog
plugin to create and publish a catalog containing:
catalog {
versionCatalog {
version("a-b-c", "1.0")
}
}
I then imported it into another project:
dependencyResolutionManagement {
repositories {
mavenLocal()
}
versionCatalogs {
create("libs") {
from("io.github.oesolutions:catalog:0.0.1")
version("a-b-c", "override")
}
}
}
Then in the build I print out the value in the build script:
println(libs.versions.a.b.c.get())
Which results in override
being displayed. I tested using Gradle 7.5.1.