In these days, I am trying to write some codes to experience the Spring reactive features and kotlin extension in Spring 5, and I also prepared a gradle Kotlin DSL build.gradle
What is working for me is using ext
in allprojects
instead of buildscript
, so in your top-level build.gradle.kts
allprojects {
ext {
set("supportLibraryVersion", "26.0.1")
}
}
then you can use it in build.gradle.kts
files in modules like this:
val supportLibraryVersion = ext.get("supportLibraryVersion") as String