Hello <again>, I’ve a project with androidApp, ios...
# multiplatform
g
Hello again, I’ve a project with androidApp, iosApp, desktopApp (compose) and shared. All can access to com.repo.domain classes and shared code, except desktopApp:
Copy code
dependencies {
    implementation(project(":shared"))
    implementation(compose.desktop.currentOs)
}
it gives me an error: “Packages cannot be imported” when I try to import a class. 🤷 IDE suggestion:
Add dependency on module 'App.shared.commonMain'
Any idea?
Well I’ve fixed by using this template: https://github.com/JetBrains/compose-jb/blob/master/templates/multiplatform-template/desktop/build.gradle.kts where I’ve replaced
kotlin("jvm")
with
kotlin("multiplatform")
and had to create “jvmMain” sourceset
no idea why…
Official sample:
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio
(https://github.com/JetBrains/compose-jb/issues/22)