is it possible to share versionCatalogs between projects? ProjectA contains a VersionCatalog ```de...
j
is it possible to share versionCatalogs between projects? ProjectA contains a VersionCatalog
Copy code
dependencyResolutionManagement {
   versionCatalogs {
      create("blah") {

         val coroutinesVersion = "1.6.1"
         library("kotlinx-coroutines-core", "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
         library("kotlinx-coroutines-jdk8", "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion")
and inside ProjectA, any module that needs coroutines, just
implement(blah.kotlinx.coroutines.core)
now ProjectB's settings.gradle.kts contains
Copy code
// blah
includeBuild("../blah-framework")
and I can include modules like this:
Copy code
implementation("io.blah:blah-module-1")
implementation("io.blah:blah-module-2")
Now in projectB, I want to include coroutines but I want to lock the version to whatever the version is in blah-framework and just include it
Copy code
implementation(blah.kotlinx.coroutines.core)
is this possible with versionCatalogs?
v
You can publish the version catalog as separate module that you then can reuse in the other project as documented