Hello! I am trying add web client in my kotlin mul...
# multiplatform
m
Hello! I am trying add web client in my kotlin multiplatform project (Android/iOS work fine), but I am in a deep trouble with a module dependencies in a JS code.
d
Please, please remove the code and put it in a reply to your thread using a code block, enclosed by 3 back ticks (`).
I think you're using an old version of the multiplatform plugin / kotlin
m
Copy code
module: common_domain
has class : User

module: common_client
has dependency: common_domain
has class : UserInfoPresenter

app: web
has dependency: common_client

I can not use the UserInfoPresenter, all classes are available from common_domain but not from common_client.




/** Web App **/

dependencies {
   implementation project(':common_client')

}

/** Common client **/

targets {
    fromPreset(presets.js, 'js')
}

/** Common domain **/

targets {
    js() {
       configure([compilations.main, compilations.test]) {
           tasks.getByName(compileKotlinTaskName).kotlinOptions {
               sourceMap = true
               moduleKind = "commonjs"
               metaInfo = true
           }
       }

       configure(compilations.main) {
           tasks.getByName(compileKotlinTaskName).kotlinOptions {
               main = "call"
           }
       }
   }
}
I found that problem only with Intellij Idea import highlight. The Idea doesn’t recognize imports but the gradle task build a code.
d
Are you using
implementation
to declare dependencies?
m
Copy code
/** Web App **/

dependencies {
   implementation project(':common_client')

}
d
Try using
api