-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
73 lines (59 loc) · 1.97 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
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin"
classpath "org.jetbrains.kotlin:kotlin-frontend-plugin:0.0.45"
}
}
group = 'akap.me.examples.urlshortner'
version = '0.0.1-SNAPSHOT'
apply plugin: 'kotlin2js'
apply plugin: 'kotlin-dce-js'
apply plugin: 'org.jetbrains.kotlin.frontend'
repositories {
jcenter()
maven { url 'https://kotlin.bintray.com/kotlin-js-wrappers' }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
testImplementation "org.jetbrains.kotlin:kotlin-test-js"
compile "org.jetbrains.kotlinx:kotlinx-html-js:0.6.11"
compile "org.jetbrains:kotlin-css:1.0.0-pre.89-kotlin-1.3.60"
compile "org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60"
compile "org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60"
compile "org.jetbrains:kotlin-react-router-dom:4.3.1-pre.89-kotlin-1.3.60"
}
kotlinFrontend {
downloadNodeJsVersion = "latest"
webpackBundle {bundleName = "main"
contentPath = file('src/main/web')
//mode = 'development'
mode = 'production'
}
npm {
dependency "style-loader"
dependency "react"
dependency "react-dom"
dependency "react-router-dom"
}
define "PRODUCTION", false
}
compileKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = true
kotlinOptions.moduleKind = 'commonjs'
kotlinOptions.main = "call"
}
compileTestKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js-tests/${project.name}-tests.js"
kotlinOptions.sourceMap = true
kotlinOptions.moduleKind = 'commonjs'
// kotlinOptions.moduleName = project.name + "-test"
kotlinOptions.main = "call"
}