Anyone might have an idea why intellij ultimate ke...
# intellij
d
Anyone might have an idea why intellij ultimate keeps on telling me that Kotlin is not configured when using new gradle plugin dsl? (I'm working with the vertx framework). I have to use apply plugin for it to start working?
y
which Kotlin plugin version are you using?
d
1.1.4-2
y
can you reproduce this in a small test project?
d
I used https://github.com/vert-x3/vertx-examples/blob/master/kotlin-example/build.gradle Then added id "org.jetbrains.kotlin.jvm" version "1.1.4-2" id "org.jetbrains.kotlin.kapt" version "1.1.4-2" to the plugins section and removed the apply plugin kotlin...
y
did you add the stdlib dependency?
d
compile "org.jetbrains.kotlinkotlin stdlib$kotlin_version"
yes
y
I'll check this, thanks!
d
Also, testCompile junit didn't resolve with that config, I had to add intellij's junit4 into the classpath?
n
Dave - Have a look at this Vert.x Examples PR: https://github.com/vert-x3/vertx-examples/pull/208
Although the example is different from the original one it does work fine with the Kotlin plugin. The updated example in the PR works fine with IntelliJ Community, but should work with Ultimate without any issues.
d
@napperley Thanks, I could try, but it's too bad there's no Convert to Kotlin IDE action for build.gradle like there is for java code files...😢
n
The conversion would require DSL support, which would be problematic since IntelliJ needs to figure out which DSL library is being used. With many different ways to do things in code that would be very tricky.
d
@napperley At least there could be an option to start a new gradle project with the kotlin dsl, and then be adapted -- we programmers are trained to be lazy... 😉
And anyways, even the convert from java code has its problems...!
n
Surprised that JB hasn't provided the Gradle Kotlin DSL project wizard yet... ⏲️
y
^ working on that
👍 1
d
👍