frank
06/04/2020, 7:45 PMKotlin 1.4-M2
and cant call to ':compileKotlinJs' tasks directly, Gradle module have tasks but not found in build.gradle.
//Fail Call :compileKotlinJs tasks
tasks.compileKotlinJs{
kotlinOptions.outputFile = "${projectDir}/routes/node/index2.js"
kotlinOptions.metaInfo = false
kotlinOptions.moduleKind = "commonjs"
}
//Work call to :compileKotlinJs
tasks {
"compileKotlinJs"(org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile::class) {
kotlinOptions.outputFile = "${projectDir}/routes/node/index2.js"
kotlinOptions.metaInfo = false
kotlinOptions.moduleKind = "commonjs"
}
}
Any idea because dont work tasks.compileKotlinJs
If exists in Gradle module?turansky
06/04/2020, 8:00 PMcompileKotlinJsIr
• LEGACY - compileKotlinJs
• BOTH - compileKotlinJs
+ compileKotlinJsIr
Plugin couldn’t create task compileKotlinJs
by default, that is why task isn’t available in DSLfrank
06/04/2020, 8:21 PMcompileKotlinJs
in DSL.
kotlin {
js(LEGACY) {
nodejs { }
binaries.executable()
}
}
Can I do something to add in DSL?Ilya Goncharov [JB]
06/04/2020, 9:49 PMcompileKotlinJs
exists.
Maybe in major count of cases it will and we can register it speculatively. But it means that in cases of both
mode it will lead to error.turansky
06/04/2020, 9:57 PMfrank
06/04/2020, 11:19 PMfrank
06/04/2020, 11:40 PMkotlinOptions
.
Do I have to use Kotlin2JsCompile::class
and KotlinCompile::class
until there is a stable version?Ilya Goncharov [JB]
06/05/2020, 4:14 AMkotlin {
js {
}
}
You can use either Kotlin2JsCompile
or maybe KotlinJsCompile