_*I can’t understand why my jvm module ( `commandl...
# multiplatform
d
I can’t understand why my jvm module (
commandline
) cannot resolve dependencies from other multiplatform modules ( my source code only ) anymore.
For example I got a
domain
like
Copy code
kotlin {
  jvm()
  js()

  sourceSets {

    val commonMain by getting {
    dependencies {
      api(`kotlin-common`)
      api(`coroutines-core-common`)
     }
    }

    val jvmMain by getting {
      dependencies {
        api(`kotlin-jdk8`)
        api(`coroutines-core`)
      }
    }
    
  }
}
and got
commandline
like
Copy code
kotlin {

  sourceSets {

    val main by getting {
    dependencies {
      implementation(project(":domain")
     }
    }
    
  }
}
But it can resolve all the dependencies exposed by
api
in domain ( kotlin, coroutines, koin, etc ), but cannot resolve from my sourceSet ( like
my.project.domain.MyClass
) For some reason it was working before, I think it stopped to work after I added an android module ( which, differently from
commainline
, it’s working flawlessly ) #FYI: I got
enableFeaturePreview("GRADLE_METADATA")
r
I’ve seen issues like this in the IDE but it still builds from command-line/gradle. eg https://youtrack.jetbrains.com/issue/KT-29082
d
Probably you are right 😄 Seem’s like AS removed this
Copy code
import kotlinx.coroutines.flow.collect
during the commit, since he think’s in unused and that broke my CI 🙂 I’ll give the confim soon
In fact, after I added the Android module, I started working on AS, instead of IntelliJ 😄 So that makes sense 🙂
r
Yeah. If the IDE is not resolving things, you can’t trust it with unused imports
d
Seems to be fine now 🙂 Thank you so much