Davide Giuseppe Farella
09/22/2022, 10:37 AMmain project and a sub project as a submodule.
Having different dependency versions caused some troubles, so we wanna align them.
sub will have some dependencies in its toml file, but main would need some dependencies that are not available in subJavier
09/22/2022, 10:41 AMVampire
09/22/2022, 11:30 AMVampire
09/22/2022, 11:32 AMDavide Giuseppe Farella
09/22/2022, 11:41 AMcreate but gave me an errorVampire
09/22/2022, 11:42 AMDavide Giuseppe Farella
09/22/2022, 11:43 AMDavide Giuseppe Farella
09/22/2022, 11:43 AMDavide Giuseppe Farella
09/22/2022, 12:02 PMInvalid catalog definition:
- Problem: In version catalog libs, you can only call the ‘from’ method a single time.
Davide Giuseppe Farella
09/22/2022, 12:02 PMlibs it works 😕Davide Giuseppe Farella
09/22/2022, 12:04 PMdependencyResolutionManagement {
versionCatalogs {
create("someLibs") { // before libs
from(files("gradle/libs.versions.toml"))
}
create("coreLibs") {
from(files("sub/gradle/libs.versions.toml"))
}
}
}Vampire
09/22/2022, 12:04 PMlibs implicitly imports gradle/libs.versions.toml if it exists, so you cannot import another and thus second file into that catalog. The error is a bit misleading and will hopefully be changed.Davide Giuseppe Farella
09/22/2022, 12:05 PMlibs is always created by defo?Vampire
09/22/2022, 12:05 PMlibs, just remove it from your code as it is created automaticallyVampire
09/22/2022, 12:05 PMVampire
09/22/2022, 12:06 PMDavide Giuseppe Farella
09/22/2022, 12:06 PMdependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
That’s why I got confusedDavide Giuseppe Farella
09/22/2022, 12:07 PM