I’m trying to extract my detekt setup into a gradl...
# detekt
s
I’m trying to extract my detekt setup into a gradle plugin, but as soon as I do so, I get an error message
Copy code
* Exception is:
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/dsl/KotlinJvmProjectExtension
        at io.gitlab.arturbosch.detekt.internal.DetektJvm.registerTasks(DetektJvm.kt:13)
        at io.gitlab.arturbosch.detekt.DetektPlugin$registerDetektJvmTasks$1.invoke(DetektPlugin.kt:50)
        at io.gitlab.arturbosch.detekt.DetektPlugin$registerDetektJvmTasks$1.invoke(DetektPlugin.kt:49)
kotlin is applied, and detekt works fine until I switch it to being in a plugin. has anyone else done this with any success? do I need to do something special?
I’ve tested with both a precompiled script plugin and a binary plugin.
hm. seems you have to declare the kotlin jvm version in the plugin dependencies. it’s not enough to have kotlin on the classpath