blob: 55c81fe56e7061f75772d3466e7126a623bbde30 [file] [log] [blame]
Roman Elizarov1f74a2d2018-06-29 19:19:45 +03001/*
Vsevolod Tolstopyatov6d1a6e32020-02-18 15:28:00 +03002 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
Roman Elizarov1f74a2d2018-06-29 19:19:45 +03003 */
Roman Elizarove1a56522018-04-04 10:31:08 +03004
5// Platform-specific configuration to compile JS modules
6
Victor Turansky964cd922020-05-02 19:52:56 +03007apply plugin: 'org.jetbrains.kotlin.js'
8
Vsevolod Tolstopyatovfcaa6df2020-08-24 18:57:22 +03009dependencies {
Vsevolod Tolstopyatovfcaa6df2020-08-24 18:57:22 +030010 testImplementation "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
Victor Turansky964cd922020-05-02 19:52:56 +030011}
Roman Elizarove1a56522018-04-04 10:31:08 +030012
Vsevolod Tolstopyatovfcaa6df2020-08-24 18:57:22 +030013kotlin {
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 }
Roman Elizarov31452902018-04-11 13:58:19 +030024}
25
Victor Turansky964cd922020-05-02 19:52:56 +030026tasks.withType(compileKotlinJs.getClass()) {
Roman Elizarove1a56522018-04-04 10:31:08 +030027 kotlinOptions {
28 moduleKind = "umd"
29 sourceMap = true
30 metaInfo = true
Roman Elizarov31452902018-04-11 13:58:19 +030031 }
32}