Rob Elliot
09/14/2020, 2:39 PMbuildSrc/src/main/kotlin
access a constant in buildSrc/build.gradle.kts
?
At the moment I have
plugins {
kotlin("jvm") version "1.4.10"
}
in buildSrc/build.gradle.kts
and const val kotlinVersion = "1.4.10"
in buildSrc/src/main/kotlin/DependencyVersions.kt
and having to change two files to update kotlin universally rather than one is irritating me.louiscad
09/14/2020, 3:20 PMRob Elliot
09/14/2020, 3:43 PMJavier
09/14/2020, 3:47 PMRob Elliot
09/14/2020, 3:48 PMJavier
09/14/2020, 3:49 PMbuildSrc
, create another buildSrc
folder
• Add a build.gradle.kts
file with the content you can see in the image (you can change the file names you include)
• Now you should be able to use Versions.kotlin
in the dependencies
blockJavier
09/14/2020, 3:50 PMbuildSrc/buildSrc/build.gradle.kts
Javier
09/14/2020, 3:51 PMbuildSrc/build.gradle.kts
Rob Elliot
09/14/2020, 3:51 PM