How can I make a pure Kotlin/JVM Gradle module dep...
# multiplatform
c
How can I make a pure Kotlin/JVM Gradle module depend on the
jvmMain
output from another multiplatform module? Normally I’d use
implementation(project(":lib"))
, but it doesn’t seem to be working when
:lib
is a multiplatform project
I’m using the Kotlin DSL by the way
r
I think that should work. Make sure you have
enableFeaturePreview("GRADLE_METADATA")
in
settings.gradle.kts
c
After playing around with this a bit more, it seems like that does indeed work for Gradle, but Intellij doesn’t seem to like it.
r
There are lots of cases for more complex project structures where things look weird in Intellij but work fine from gradle. If you have a minimal example I recommend filing a bug at kotl.in/issue but unfortunately some of this is just to be expected since we’re still in the experimental/early-adopter phase with all of this.
But I’m pretty sure a vanilla project with a single multiplatform module and a single JVM consumer module works fine in IDEA right now. I’m guessing your actual project is probably more complicated than this.