I have a project with following structure: ```comm...
# multiplatform
m
I have a project with following structure:
Copy code
common
  - commonMain (contains expect classes)
  - jvmMain (contains actual classes for jvm)
  - jsMain (contains actual classes for js)
jvm (contains a jvm project and depends on common)
 - JVMMainClass
js (contains a js project and depends on common)
 - JSMainClass
the jvm works fine but I have a problem with js module.
JSMainClass
sees classes from common module but the implementations are from jvmMain instead of jsMain. How do I fix that?
d
Which js plugin are you using?
m
js
module build.gradle is pretty simple:
Copy code
apply plugin: 'kotlin2js'
apply plugin: 'kotlin-dce-js'

// just run assemble and it'll do what it has to do
dependencies {
    implementation project(':common')

    implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
}

compileKotlin2Js {
    kotlinOptions.moduleKind = 'commonjs'
}
classes declared in
common
module in
commonMain
source set are visible but I want to also see
jsMain
source set
d
I'm not 100% sure (I don't do Kotlin/JS) but you might be using the old js plugin. https://blog.jetbrains.com/kotlin/2019/06/kotlin-1-3-40-released/
m
yeah that seems to be it! thanks a lot 🙏