1 /* 2 * Copyright 2016-2021 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 7 import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile 8 <lambda>null9plugins { 10 kotlin("js") 11 } 12 <lambda>null13dependencies { 14 testImplementation(kotlin("test-js")) 15 } 16 <lambda>null17kotlin { 18 js(LEGACY) { 19 moduleName = project.name.removeSuffix("-js") 20 } 21 22 sourceSets { 23 main { 24 kotlin.srcDirs("src") 25 resources.srcDirs("resources") 26 } 27 test { 28 kotlin.srcDirs("test") 29 resources.srcDirs("test-resources") 30 } 31 } 32 } 33 <lambda>null34tasks.withType<KotlinJsCompile> { 35 kotlinOptions { 36 moduleKind = "umd" 37 sourceMap = true 38 metaInfo = true 39 } 40 } 41