https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

menegatti

11/30/2018, 11:59 AM
Hey guys, I'm having a bit with issue with adding a kotlinJs module to my project, mostly due to gradle not being able to find dependencies
Specifically, I'm trying to add
kotlinx-html-js
but it is not being properly resolved
also, my
build.gradle
on the js part is showing all these warnings that "string cannot be applied to implementation" for instance
my js/build.gradle looks like
Copy code
apply plugin: 'org.jetbrains.kotlin.frontend'
apply plugin: 'kotlin2js'

kotlinFrontend {
    downloadNodeJsVersion = '10.0.0'

    npm {
        dependency("webpack-cli", "v2.0.12")
        dependency("react", "16.4.2")
        dependency("react-dom", "16.4.2")
        dependency("react-router-dom", "4.2.2")
        dependency("@material-ui/core", "1.4.3")
    }

    sourceMaps = true

    webpackBundle {
        bundleName = "main"
        contentPath = file('src/main/web')
        proxyUrl = "<http://localhost:8080>"
    }
}

dependencies {
    implementation project(':common')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
    implementation "org.jetbrains.kotlinx:kotlinx-html-js:0.6.0"
}

compileKotlin2Js {
    kotlinOptions.metaInfo = true
    kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
    kotlinOptions.sourceMap = true
    kotlinOptions.moduleKind = 'commonjs'
    kotlinOptions.main = "call"
}
the project
build.gradle
just list all the repositories for these dependencies