공부
[Gradle] plugins version by variable
승가비
2022. 5. 22. 19:37
728x90
// gradle.properties
springBootVersion=2.6.7
// settings.gradle.kts
pluginManagement {
val springBootVersion: String by settings
plugins {
id("org.springframework.boot") version springBootVersion
}
}
// build.gradle.kts
plugins {
id("org.springframework.boot")
}
In gradle, how to use a variable for a plugin version?
One of my build scripts imports that nebula plugin: plugins { id 'nebula.ospackage' version '3.5.0' } I've been moving all of my version info into a separate file that all projects have access ...
stackoverflow.com
https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_version_management
Using Gradle Plugins
Where «plugin id» and «plugin version» must be constant, literal, strings and the apply statement with a boolean can be used to disable the default behavior of applying the plugin immediately (e.g. you want to apply it only in subprojects). No other st
docs.gradle.org
728x90