This message was deleted.
# plugin-development
s
This message was deleted.
c
Assuming you are using GradleRunner, configure it with
withPluginClasspath()
.
g
Hmm that makes sense, but I'm trying to avoid it and use ProjectBuilder
c
Fair enough. Ensure your plugin is built using
kotlin-dsl
plugin - this pulls in everything necessary, which the test configuration will pull from.
This:
Copy code
plugins {
    // this pulls in the appropriate Kotlin versions and applies java-gradle-plugin
    // DO NOT separately use kotlin("jvm")
    `kotlin-dsl` 
}
g
I had kotlin-dsl already, but I was also applying
kotlin('jvm')
. Removing it as you said fixed the error. Do you know why?
Thank you!
c
no worries. kotlin(“jvm”) is for use when developing a Kotlin-based application or library; kotlin-dsl is for developing a Kotlin-based Gradle plugin. Mixing the two is bad news - conflicting Kotlin versions is the most common problem (Gradle has an embedded Kotlin version used for build scripts).
👍🏻 1