https://kotlinlang.org logo
Title
d

dave08

09/05/2017, 1:35 PM
How do I check/update ... I'm using gradle wrapper and intellij ultimate
c

Czar

09/05/2017, 1:36 PM
./gradlew -version
a

agomez

09/05/2017, 1:36 PM
gradle wrapper --gradle-version x.y
d

dave08

09/05/2017, 1:37 PM
3.1 😢
a

agomez

09/05/2017, 1:37 PM
you can upgrade using that command
d

dave08

09/05/2017, 1:37 PM
Thanks!!
To which version?
a

agomez

09/05/2017, 1:38 PM
the latest, 4.1
c

Czar

09/05/2017, 1:38 PM
./gradlew wrapper --gradle-version=4.1 --distribution-type=all
I recommend always doing
--distribution-type=all
on developers' machines because it helps IDE to help you to write the build scripts.
a

agomez

09/05/2017, 1:40 PM
task wrapper(type: Wrapper) {
    gradleVersion = '4.1'
    distributionType = Wrapper.DistributionType.ALL
}
in the build.gradle achieves the same
d

dave08

09/05/2017, 1:46 PM
Did gradlew wrapper, opened build.gradle.kts file, but I don't see completion and error about plugins not having lambda param... is it because I still have build.gradle (until I tranfer its contents...)
I should rename it?
Also, there is no buildscript {} ?
a

agomez

09/05/2017, 1:49 PM
rename it and also check intellij version, older versions doesnt support gradle build scripts in koltin
d

dave08

09/05/2017, 1:49 PM
2017.2.3
Oh now it caught on, I guess it takes a bit of time for the IDE to catch the file...?
Thanks!
c

Czar

09/05/2017, 1:51 PM
I've found that easiest way for me was creating an empty project with build.gradle.kts, transferring full build.gradle config there bit by bit, then renaming build.gradle, copying build.gradle.kts to the real project and re-importing from it.
d

dragas

09/05/2017, 2:10 PM
I would've suggested editing gradle.properties in gradle folder of your project, but that seems to be much simpler
d

dave08

09/05/2017, 4:32 PM
There's so much to learn, I would have loved a decent step-by-step tutorial about the differences between the two instead of all those examples in the repo... I guess for now I'm switching back to regular old gradle 😢
Not that I didn't try... Thanks anyways, I hope I'll get back to it soon 😇