https://kotlinlang.org logo
c

coolcat

07/27/2021, 2:31 PM
If I have 2 KMM libraries in a Gradle subproject, is it possible for library A to reference library B by using
Copy code
dependencies {
    implementation(project(":libB"))
}
When I do this my
compileKotlinIos
task fails with
Unresolved reference
for the classes in libB. Is there any special syntax for adding the common, android and ios flavours of the shared project?
OK well here is an example project: https://github.com/dhoskins/kmm-multilib-example
If anyone could help me figure out why
./gradlew build
gives
Copy code
> Task :lib1:compileKotlinMetadata FAILED
e: .../lib1/src/commonMain/kotlin/lib1/Greeting1.kt: (3, 8): Unresolved reference: lib2
e: .../lib1/src/commonMain/kotlin/lib1/Greeting1.kt: (7, 25): Unresolved reference: Greeting2
m

Mayank

07/29/2021, 6:24 PM
Try gradle version 7.1.1
7 Views