I'd like to add a `module-info.java` to my `src/ma...
# gradle
j
I'd like to add a
module-info.java
to my
src/main/kotlin
directory, any examples of how the gradle config should be done to make the
module-info.java
be included? I've tried adding
module-info.java
to
src/main/java
but then it doesn't find the kotlin classes
j
thanks!
r
In that example
module-info.java
is in
src/main/java
rather than
src/main/kotlin
- is there a "good" way to avoid having two source dirs? This works:
Copy code
tasks {
    val compileKotlin: KotlinCompile by tasks
    val compileJava: JavaCompile by tasks

    compileJava.source = compileKotlin.source
    compileKotlin.destinationDirectory.set(compileJava.destinationDirectory.get())
}
but my recollection is that Gradle people consider it a grievous sin to have tasks sharing inputs and outputs.
j
it'd be nice to have a module-info.kt, currently if you click convert to kotlin on the module-info.java, you just get an empty .kt file