Question: I'm currently building out a Gradle proj...
# plugin-development
k
Question: I'm currently building out a Gradle project that does this:
Copy code
plugins {
  groovy
  `kotlin-dsl`
}
In my plugin entry point (
myPlugin.gradle.kts
), I have this:
Copy code
import my.groovy.sources.ThisClass
(ie.
ThisClass
is part of the Groovy source set) Right now, my IDE is not reporting any issues, but it looks like the
compileKotlin
task is barfing because it can't find
ThisClass
. Is there something that needs to be wired specifically, possibly to ensure that the Groovy and Kotlin code is interoperable?
v
They are interoperable, but only directed. Groovy can use Java and Kotlin, Java can use Kotlin. But Kotlin cannot use Java or Groovy. And Java cannot use Groovy. Unless you change the dependencies as documented at https://docs.gradle.org/current/userguide/building_java_projects.html#sub:compile_deps_jvm_lang. That is for Groovy vs. Java, but I'd guess it should basically be the same with Kotlin involved.