https://kotlinlang.org logo
Title
h

hudsonb

10/31/2018, 11:55 AM
Is there a minimum gradle version for kotlin 1.3?
r

ribesg

10/31/2018, 11:56 AM
Depends what you’re talking about. If you just compile kotlin, I don’t think so. If you’re using Gradle kotlin-dsl, then yes
h

hudsonb

10/31/2018, 11:59 AM
When I change
ext.kotlin_version = '1.2.50'
to
1.3.0
, I get the following when it tries to apply the kotlin plugin:
A problem occurred evaluating root project 'kubed'.
> Failed to apply plugin [id 'kotlin']
   > Could not generate a proxy class for class org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension.
r

ribesg

10/31/2018, 12:00 PM
Are you using JDK8?
h

hudsonb

10/31/2018, 12:02 PM
Yep
Upgrading gradle for this project is fine, been meaning to add a gradle wrapper to it forever. Just have some work stuff that requires gradle 2 right now so 2 is on the path and 1.3.0 doesn't seem to like it
r

ribesg

10/31/2018, 12:03 PM
This error has a cause, try to print it with
--stacktrace
h

hudsonb

10/31/2018, 12:05 PM
groovy.lang.MissingPropertyException: Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
r

ribesg

10/31/2018, 12:07 PM
It does not find your
ext.kotlin_version
h

hudsonb

10/31/2018, 12:07 PM
Sorry I was messing around see what was wrong, added that back in the error is:
java.lang.NoClassDefFoundError: org/gradle/api/attributes/HasAttributes
Which I assume was added to gradle in a version newer than the one Im using
r

ribesg

10/31/2018, 12:08 PM
Pretty sure this means Gradle upgrade required
h

hudsonb

10/31/2018, 12:08 PM
Agreed, thanks
r

ribesg

10/31/2018, 12:08 PM
This one thing was added in 3.3
So unless it’s something else that you upgraded that requires that, we now know that the answer to your original question was that yes, Kotlin 1.3 requires Gradle 3.3+
👍 1
g

gildor

10/31/2018, 12:28 PM
In most cases better to use the latest stable Gradle
:yes: 3