Czar
09/25/2017, 2:06 PMbuildscript
block and other places?
I want to declare kotlinVersion
once and use it throughout the build file. In Groovy Gradle it would've been buildscript { ext.kotlinVersion = "" }
But in kotlin-dsl buildscript { val kotlinVersion by extra { "" } }
does not work, in dependencies
block it is not resolved.napperley
09/26/2017, 4:42 AMbuildscript {
extra["kotlin-ver"] = "1.1.50"
// ...
dependencies {
classpath(kotlin(module = "gradle-plugin", version = "${extra["kotlin-ver"]}"))
}
}
val KOTLIN_VER = "${extra["kotlin-ver"]}"
jtonic
10/14/2017, 10:36 AM