https://kotlinlang.org logo
Title
s

sdeleuze

05/09/2017, 12:15 PM
Hey, how are we supposed to share the same
kotlinVersion
between the new
plugin { }
block and the
dependencies { }
one? (I made quick tries with
by extra
but could not make it works)
s

suresh

05/09/2017, 3:12 PM
sdeleuze: One trick you can do is, put all your versions in
gradle.properties
as
systemProp
and access them from
builScript
,
plugins
&
buildSrc
etc. https://github.com/sureshg/kotlin-starter/blob/master/gradle.properties#L29-L32 . At least this is working in my case, so i don’t have to make changes in many places to bump up the kotlin/kotlinx versions. By the way,
plugins
block does allow
System.getProperty
.
s

sdeleuze

05/09/2017, 3:13 PM
Since kotlin dep versions are automatically set, it allows me to avoid duplication with a clean and simple syntax
👍 1
s

suresh

05/09/2017, 3:15 PM
nice..in my case , i have to put my kotlin/kotlinx version in jar and the same plugins has to access from buildSrc.