https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

spierce7

06/04/2021, 10:14 PM
Does anyone know how to get a sibling java gradle module to be usable from Kotlin multiplatform? In the jvmMain source set I’m adding it as a direct implementation dependency, and the ide is telling me it can’t import those classes.
It appears to only work if we precompile the module. It is looking at the class files in the build dir
r

russhwolf

06/04/2021, 11:21 PM
Might be you need to add
withJava()
to your target declaration. See https://kotlinlang.org/docs/mpp-configure-compilations.html#include-java-sources-in-jvm-compilations
s

spierce7

06/05/2021, 12:06 AM
good idea! I’ll give it a shot
3 Views