blob: 4b1e3bde7f5be4f2baf7ddb19965afbac97c187f [file] [log] [blame]
/*
* Copyright 2016-2019 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: 'kotlin2js'
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")
}
}