1/* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5// Platform-specific configuration to compile JS modules 6 7apply plugin: 'org.jetbrains.kotlin.js' 8 9dependencies { 10 testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version" 11} 12 13kotlin { 14 js(LEGACY) { 15 moduleName = project.name - "-js" 16 } 17 18 sourceSets { 19 main.kotlin.srcDirs = ['src'] 20 test.kotlin.srcDirs = ['test'] 21 main.resources.srcDirs = ['resources'] 22 test.resources.srcDirs = ['test-resources'] 23 } 24} 25 26tasks.withType(compileKotlinJs.getClass()) { 27 kotlinOptions { 28 moduleKind = "umd" 29 sourceMap = true 30 metaInfo = true 31 } 32} 33