下面是一条普通代码:
compileKotlin2Js.kotlinOptions {
moduleKind = "commonjs"
outputFile = "node/crypto.js"
}
它给出以下错误:
Script compilation errors:
Line 44: compileKotlin2Js.kotlinOptions {
^ Unresolved reference: compileKotlin2Js
Line 45: moduleKind = "commonjs"
^ Unresolved reference: moduleKind
Line 46: outputFile = "node/crypto.js"
^ Unresolved reference: outputFile
如何将其转换为kotlin语法?
最佳答案
这对您有用吗?
tasks {
"compileKotlin2Js"(Kotlin2JsCompile::class) {
kotlinOptions.metaInfo = true
}
}
关于gradle - Gradle Kotlin:如何将build.gradle脚本的一部分从groovy转换为build.gradle.kts语法?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/60550955/