hi - new to gradle, using the kotlin DSL, i declare a
val
but they don’t appear to be in scope for the
buildscript
block right below, though work fine for
allscripts
or
subprojects
eg:
val artifactVersion: String by project
buildscript {
version = artifactVersion // unresolved reference
}
allprojects {
version = artifactVersion // ok
}
seeing as these constants are dependent on
project
it’s not clear how I can move this to
buildSrc
and make them available everywhere.
if i redeclare them with the
buildscript
block it works but that defeats the purpose (i have many of these constants)