Ian Stewart
03/24/2020, 7:25 PMIan Stewart
03/24/2020, 7:27 PMkotlin.js.compiler=ir
build.gradle.kts:
plugins {
java
kotlin("multiplatform") version "1.4-M1"
}
repositories {
mavenCentral()
maven("<https://dl.bintray.com/kotlin/kotlin-eap>")
maven("<https://kotlin.bintray.com/kotlinx>")
}
val coroutinesVersion = "1.3.5-1.4-M1"
...
kotlin {
js {
}
sourceSets {
val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutinesVersion")
}
}
js().compilations["main"].defaultSourceSet {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutinesVersion")
}
}
}
}
Ian Stewart
03/24/2020, 7:28 PM@ExperimentalJsExport
class MyClass() {
}
turansky
03/24/2020, 8:15 PMstdlib
dependencies?Ian Stewart
03/24/2020, 8:41 PMdependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("stdlib-common"))
implementation(kotlin("stdlib-js"))
}
and to the js:
js().compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("stdlib-common"))
implementation(kotlin("stdlib-js"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutinesVersion")
}
}
Note the Js portion works, it is the compileKotlinMetadata task that fails. Is there somewhere else I should put the dependency? My guess is that it isn't precisely the js that is failing.turansky
03/24/2020, 8:55 PMturansky
03/24/2020, 8:55 PMbrowser()
or nodejs()
Ian Stewart
03/24/2020, 9:00 PMturansky
03/24/2020, 9:12 PMbashor
03/24/2020, 9:37 PMJsExport
Ian Stewart
03/24/2020, 9:38 PMIan Stewart
03/24/2020, 9:39 PMbashor
03/24/2020, 9:40 PMExperimentalJsExport
needed to disable warningbashor
03/24/2020, 9:41 PMbashor
03/24/2020, 9:42 PMbashor
03/24/2020, 9:44 PMIan Stewart
03/24/2020, 10:07 PMIan Stewart
03/24/2020, 10:09 PMIan Stewart
03/24/2020, 10:13 PMbashor
03/24/2020, 11:21 PMIan Stewart
03/25/2020, 12:50 PMbashor
03/25/2020, 1:00 PM