blob: 71301f983ef7d419e43c912ac6936e2e30b35617 [file] [log] [blame]
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
// Platform-specific configuration to compile JS modules
apply plugin: 'kotlin-platform-js'
kotlin.experimental.coroutines "enable"
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
}
tasks.withType(compileKotlin2Js.getClass()) {
kotlinOptions {
moduleKind = "umd"
sourceMap = true
metaInfo = true
}
}
compileKotlin2Js {
kotlinOptions {
// drop -js suffix from outputFile
def baseName = project.name - "-js"
outputFile = new File(outputFile.parent, baseName + ".js")
}
}