티스토리 뷰

공부

[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")
}

https://stackoverflow.com/questions/37555196/in-gradle-how-to-use-a-variable-for-a-plugin-version/72336787#72336787

 

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

'공부' 카테고리의 다른 글

[Spring] kafka config  (0) 2022.05.22
[logback] kafka-appender  (0) 2022.05.22
java.lang.NoClassDefFoundError: javax/servlet/Filter  (0) 2022.05.22
[JavaScript] Array.isArray()  (0) 2022.05.22
[Sh] array loop  (0) 2022.05.22
댓글