This repository was archived by the owner on Jul 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
/
Copy pathbuild.gradle
73 lines (61 loc) · 1.74 KB
/
build.gradle
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
group = 'org.jetbrains.elemental'
version = '0.0.1-SNAPSHOT'
apply plugin: 'kotlin2js'
apply plugin: 'kotlin-dce-js'
apply plugin: 'org.jetbrains.kotlin.frontend'
repositories {
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
compile("org.jetbrains.kotlinx:kotlinx-html-js:$html_version")
}
kotlinFrontend {
// uncomment this to specify exact nodejs version (bundle will be downloaded)
// downloadNodeJsVersion = "8.7.0"
sourceMaps = false
npm {
replaceVersion("kotlinx-html-js", "1.1.0")
replaceVersion("kotlinx-html-shared", "1.1.0")
replaceVersion("kotlin-js-library", "1.1.0")
dependency("react")
dependency("react-dom")
dependency("react-router")
dependency("jquery")
dependency("react-markdown")
devDependency("css-loader")
devDependency("style-loader")
devDependency("babel-loader")
devDependency("@babel/core")
devDependency("karma")
}
webpackBundle {
publicPath = "/frontend/"
port = 8080
proxyUrl = "http://localhost:9090"
}
}
compileKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = true
kotlinOptions.moduleKind = 'commonjs'
kotlinOptions.main = "call"
}
sourceSets {
main {
kotlin.srcDirs += "src"
resources.srcDirs += "resources"
output.resourcesDir = "build/js/resources"
}
test {
kotlin.srcDirs += "test"
resources.srcDirs += "testResources"
}
}
kotlin {
experimental {
coroutines "enable"
}
}