Slackbot
01/08/2024, 2:37 PMVampire
01/08/2024, 4:55 PMbut Is there a way to dynamically apply the boot version used in the convention plugin when applying the plugin?Besides letting the user applying the boot plugin as mentioned, the user could use normal version management things like a version constraint, eventually with a strict version when downgrading, and so on to control which boot plugin verison will be on the buildscript class path.
ė°ģ±ģ°
01/10/2024, 9:47 AMdependencies {
implementation(plugin(libs.plugins.spring.boot))
implementation(plugin(libs.plugins.spring.dependency.management))
}
⢠gradle
⦠libs.version.toml (spring boot version)
The my project is structured like this.
When using the project by publishing it on nexus
Even if someone only want to use nexus-convention, there is an inconvenience in that boot dependency is included in the client.
However, it is cumbersome to configure all gradle.kts into each project.
What solutions can we consider?Vampire
01/10/2024, 10:21 AMplatform(...).
Regarding the question, what is the problem with the dependency being in the plugin.
Does the consumer only wanting nexus convention use spring boot plugin, but wants a different version, or does he not want to use it at all?
If he does not want to use it at all, there should be no harm.
If he does want to use a different version, either he can mitigate the issue by controlling the version, or you can mitigate the issue by either indeed splitting the plugins in multiple convention plugin projects, or you can mitigate it by just having spring boot plugin as compileOnly but then consumers that do want to have spring boot need to provide the dependency themselves. You could for example also make your convention plugin not apply the plugin at all, but just react to it being applied, so that consumers always need to apply the spring boot plugin themselves, but then get the configuration from your convention plugin.ė°ģ±ģ°
01/10/2024, 10:25 AMė°ģ±ģ°
01/10/2024, 10:31 AMė°ģ±ģ°
01/10/2024, 10:36 AMVampire
01/10/2024, 10:37 AMė°ģ±ģ°
01/10/2024, 10:42 AMVampire
01/10/2024, 10:56 AMė°ģ±ģ°
01/10/2024, 11:38 AM