projects depend on other gradle modules in the repo that are
kotlin("jvm")
? I thought they could, but I’m seeing problems
c
Casey Brooks
11/24/2020, 9:30 PM
You’d need the
jvmMain
sourceSet to depend on the other
kotlin("jvm")
module. Otherwise, it’s going to try and match up all the targets of the multiplatform lib to the jvm lib using Gradle Metadata, and will fail to find matching variants
a
Arkadii Ivanov
11/25/2020, 12:33 AM
You can create a shared source set for JVM and Android, e.g.
jvmCommonMain
. This source set can depend on a JVM module.
s
spierce7
11/25/2020, 2:26 AM
@Casey Brooks That’s exactly what I did. Wasn’t working though. I swear I’ve had this work before.