blob: 277cce18677e8f471db75ff751ca3c16d5abbbef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
apply plugin: 'kotlin-platform-js'
apply plugin: 'kotlinx-serialization'
task cleanLibs(type: Delete) {
delete 'build/js', 'build/libs'
}
if (project.gradle.startParameter.taskNames.contains("jar")) {
compileKotlin2Js.dependsOn 'cleanLibs'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
compileKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = !production
kotlinOptions.moduleKind = 'umd'
}
compileTestKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js-tests/${project.name}-tests.js"
kotlinOptions.sourceMap = !production
kotlinOptions.moduleKind = 'umd'
}
dependencies {
expectedBy project(":kvision-modules:kvision-common-remote")
expectedBy project(":kvision-modules:kvision-common-types")
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutinesVersion"
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serializationVersion"
compile "pl.treksoft:jquery-kotlin:$jqueryKotlinVersion"
}
|