Aurimas Liutikas | e64dad7 | 2021-05-12 21:56:16 +0000 | [diff] [blame] | 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 | |
| 7 | apply plugin: 'org.jetbrains.kotlin.js' |
| 8 | |
| 9 | dependencies { |
| 10 | testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version" |
| 11 | } |
| 12 | |
| 13 | kotlin { |
| 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 | |
| 26 | tasks.withType(compileKotlinJs.getClass()) { |
| 27 | kotlinOptions { |
| 28 | moduleKind = "umd" |
| 29 | sourceMap = true |
| 30 | metaInfo = true |
| 31 | } |
| 32 | } |