Slackbot
07/22/2022, 6:35 AMVampire
07/22/2022, 6:43 AMSatyarth Sampath
07/22/2022, 6:44 AMSatyarth Sampath
07/22/2022, 6:46 AMVampire
07/22/2022, 6:48 AMEli Graber
07/22/2022, 8:02 AMCan you elaborate on how can I include a version catalog that is defined in the root project for the included builds?
Something like this in your included build's settings.gradle.kts
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
Satyarth Sampath
07/22/2022, 8:40 AMSatyarth Sampath
07/22/2022, 8:41 AMSatyarth Sampath
07/22/2022, 8:41 AMVampire
07/22/2022, 9:54 AM-all
distribution.
In your situation it has no pros at all.
It only wastes time, diskspace, and bandwidth for everyone running the build.
The -all
distribution only has one advantage and only if you use Groovy DSL and only while you edit or debug the build scripts.
Even with Groovy DSL, it wastes the same things mentioned above for anyone or anything just executing the build.
Using the -all
distribution is mainly a work-around for an IDE bug that hopefully gets fixed one day.
Another detail, but that is mainly optics, is that it is only unnecessary clutter to wrap dependencyResolutionManagement
within dependencyResolutionManagement
as you did it in multiple places there.
Regarding the problem, it is because gradle/libs.versions.toml
is automatically considered.
So by importing "another" file into the "libs" catalog of your root settings.gradle.kts
file you trigger the error.
There could be a leniency added that this is allowed for the same file, but currently it is not.
Just remove the declaration from the root settings.gradle.kts
and it works.Satyarth Sampath
07/22/2022, 10:19 AMgradle/libs.versions.toml
would be automatically considered or is there a file pattern that would be considered be default?Satyarth Sampath
07/22/2022, 10:20 AM.gradle
)file? All the projects that are a part of the composite build would work?Vampire
07/22/2022, 12:35 PMgradle/libs.versions.toml
is exactly the one that is considered automatically.
But only within that build. For the included builds you need to include manually like you have it if you want to use the same catalog.Vampire
07/22/2022, 12:35 PMSatyarth Sampath
07/22/2022, 12:52 PMVampire
07/22/2022, 2:14 PMSatyarth Sampath
07/22/2022, 2:20 PMSatyarth Sampath
07/26/2022, 7:23 AMSatyarth Sampath
07/26/2022, 7:35 AMVampire
07/26/2022, 7:42 AMSatyarth Sampath
07/26/2022, 7:46 AMVampire
07/26/2022, 7:56 AM