y

    yshrsmz

    2 years ago
    Does anyone successfully configured KMP(ios & android) with 1.3.61? When I set
    kotlin.mpp.enableGranularSourceSetsMetadata=true
    , Some expect/actual definition does not resolve its type correctly in commonMain and android app module. When I set
    kotlin.mpp.enableGranularSourceSetsMetadata=false
    , androidMain does not resolve android classes My app was working fine when I used 1.3.50.
    I forgot to note that it seems like just an IDE issue, the code itself seems to compiles fine
    russhwolf

    russhwolf

    2 years ago
    What’s your module structure look like? I tend to see issues like that any time there’s any non-default sources between common and the platforms, though there’s various workarounds some people use.
    y

    yshrsmz

    2 years ago
    I found out why after comparing a minimum working example with my project. Due to the old workaround, my sourceSets configuration was something like below
    kotlin {
      android()
      iosX64()
    
      sourceSets {
        androidMain {
          dependsOn commonMain
        }
        androidTest {
          dependsOn androidMain
        }
      }
    }
    After removing these
    dependsOn
    , now it seems to be resolving fine. Thanks @russhwolf !