How to add java to jvm multiplatform target

I’m reading the docs for the Gradle plugin, and it says:

Note: jvm targets do not compile Java;

So, is there some way to mix in some Java source files with the Kotlin source files in the jvmMain module?

Maybe I’ll read the entire manual for Gradle. The PDF is only 1,112 pages.

Currently there is an undocumented and soon-to-be-deprecated preset jvmWithJava, but the upcoming version 1.3.40 will have a proper way of doing this, please follow https://youtrack.jetbrains.com/issue/KT-26256 for updates.

1 Like