zt
02/05/2024, 5:34 AMimplementation(libs.filePicker.get().toString()) {
exclude(group = "org.jetbrains.compose.material", module = "material")
}
I can do implementation(libs.filePicker)
but then i cant exclude the material dependency
Probably just an oversightJavier
02/05/2024, 8:27 AMdependencies {
“commonMainImplementation”(…) {
exclude(…)
}
}
Vampire
02/05/2024, 12:23 PMJavier
02/05/2024, 12:26 PMJavier
02/05/2024, 12:27 PMVampire
02/05/2024, 12:30 PMmissing phase to be able to generate the configuration accessorsNot really. Anything that depends on the build script content cannot safely be done for usage within that build script, because you would need to execute the build script content which can be any arbitrary code to know what to generate, but you need the generated accessors to compile the build script, so typical hen-and-egg situation. You would need another special block like
plugins { ... }
or pluginManagement { ... }
that is extracted and evaluated separately from the rest of the buildscript with a possibility for plugins to provide some syntax in there or something like that. And that would not make the implementation majorly more complex, but also the usage much more confusing, which already is confusing at times.Vampire
02/05/2024, 12:32 PMJavier
02/05/2024, 12:52 PMJavier
02/05/2024, 12:52 PMJavier
02/05/2024, 12:53 PMVampire
02/05/2024, 12:55 PMHow they fixed that in suites?They did what the Kotlin issue title says. 😄 They properly modeled a type-safe dependencies block in there.
Vampire
02/05/2024, 12:55 PMAny
receiving method there that is forwarded to Gradle which then know how to interpret the version catalog accessorVampire
02/05/2024, 12:56 PMAction
overload as it would be unclear what to configure as the notation is Any
.Vampire
02/05/2024, 12:56 PMJavier
02/05/2024, 12:56 PMVampire
02/05/2024, 12:58 PMJavier
02/05/2024, 1:00 PMksp
+ KMP for example. ksp + commonMain, etc. The basic interface only solves KGP problemszt
02/05/2024, 2:25 PMVampire
02/05/2024, 2:29 PMdependencies {
"commonMainImplementation"(…) {
exclude(…)
}
}
Or if you want it a bit less string-y:
dependencies {
val commonMainImplementation by configurations
commonMainImplementation(…) {
exclude(…)
}
}