Roman Elizarov | e1a5652 | 2018-04-04 10:31:08 +0300 | [diff] [blame^] | 1 | |
| 2 | // Platform-specific configuration to compile JS modules |
| 3 | |
| 4 | apply plugin: 'kotlin-platform-js' |
| 5 | |
| 6 | tasks.withType(compileKotlin2Js.getClass()) { |
| 7 | kotlinOptions { |
| 8 | moduleKind = "umd" |
| 9 | sourceMap = true |
| 10 | metaInfo = true |
| 11 | // drop -js suffix from outputFile |
| 12 | def baseName = project.name - "-js" |
| 13 | outputFile = new File(outputFile.parent, baseName + ".js") |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | dependencies { |
| 18 | compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" |
| 19 | testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version" |
| 20 | } |