In our purely Kotlin project we would like to use flexible Java 9 module system. Otherwise we have to use internal visibility modifier too often to hide internal Kotlin module functionality from other Kotlin modules.
Is it possible to use Jigsaw in Kotlin?
module-info.javaintosrc/main/kotlin. It's easier with Maven, because everything is put undertarget/classes. Just take sure, that the Kotlin plugin is triggered before the Maven compiler plugin (eg. put it in phaseprocess-sources) and that you use a version of the Maven compiler that understandsMETA-INF/versionsfrom kotlin.stdlib (e.g. 3.11.0).--patch-moduleis needed, because with Gradle Kotlin classes and Java classes are placed into different directories. You can ignore the warning from kotlinlang.org/docs/… and add sth. likesourceSets { main.java.srcDirs += 'src/main/kotlin' }. If you have specified the JVM target for Kotlin, you must now do the same for Java (e.g.compileJava { sourceCompatibility = '9'; targetCompatibility = '9' }.