Hey, with gradle kotlin scripts, one of the things...
# build-tools
d
Hey, with gradle kotlin scripts, one of the things that I find a bit toooo noisy compared to plain groovy gradle scripts, is the necessity to put in
${property("foo")}
inside dependencies definitions, i.e.,
compile("com.google.protobuf:protobuf-java:${property("protobufVersion")}")
I know there is another way of defining the var inside the kts file,
var foo="1.2"
then using
$foo
inside the dependency definition. The latter being more "groovy" like (without the var definition). Is there no shorter way of expressing this?
c
#gradle
d
ta
c
Anyway, using `val`s seems the best for now. Unless something changed since I tried Gradle+Kotlin.
You can also make a less verbose utility function like
prop("nameOfProperty")