-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
77 lines (65 loc) · 1.94 KB
/
build.gradle
File metadata and controls
77 lines (65 loc) · 1.94 KB
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
74
75
76
77
buildscript {
ext.kotlin_version = '1.3.0'
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/kotlin/kotlin-eap'
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.jetbrains.kotlin:kotlin-frontend-plugin:0.0.37'
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}
apply plugin: 'kotlin-platform-js'
apply plugin: 'kotlinx-serialization'
apply plugin: 'org.jetbrains.kotlin.frontend'
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/kotlin/kotlinx/'
}
jcenter()
}
dependencies {
compile "io.data2viz:d2v-data2viz-common:0.7.1"
compile "io.data2viz:d2v-data2viz-js:0.7.1"
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:0.9.0"
compile "org.jetbrains.kotlinx:kotlinx-html-js:0.6.12"
}
compileKotlin2Js {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.moduleKind = 'commonjs'
kotlinOptions.main = "call"
kotlinOptions.sourceMap = true
kotlinOptions.sourceMapEmbedSources = "always"
}
kotlinFrontend {
sourceMaps = true
npm {
dependency('style-loader', '0.22.1')
dependency('css-loader', '1.0.0')
dependency('url-loader', '1.1.1')
}
webpackBundle {
contentPath = file('src/main/web')
mode = 'development'
sourceMapEnabled = true
bundleName = 'data2graph'
}
}
task assembleFrontend(type: Copy) {
dependsOn bundle
ext.webDir = "$projectDir/src/main/web"
ext.webpackBundleDir = "$projectDir/build/bundle"
ext.distDir = "$projectDir/build/dist"
inputs.dir(webDir)
inputs.dir(webpackBundleDir)
outputs.dir(distDir)
from webDir
from webpackBundleDir
into distDir
}