Thread
#multiplatform
    max.denissov

    max.denissov

    3 years ago
    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.
    Dico

    Dico

    3 years ago
    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
    max.denissov

    max.denissov

    3 years ago
    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.
    Dico

    Dico

    3 years ago
    Are you using
    implementation
    to declare dependencies?
    max.denissov

    max.denissov

    3 years ago
    /** Web App **/
    
    dependencies {
       implementation project(':common_client')
    
    }
    Dico

    Dico

    3 years ago
    Try using
    api