-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
37 lines (32 loc) · 903 Bytes
/
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
buildscript {
ext.kotlin_version = '1.2.51'
repositories {
jcenter()
maven {
url "https://dl.bintray.com/kotlin/kotlin-eap"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// apply kotlin2js
apply plugin: 'kotlin2js'
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile "org.jetbrains.kotlinx:kotlinx-html-js:0.6.11"
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
}
// configure kotlin compiler
compileKotlin2Js {
//kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "web/${project.name}.js"
//"$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = true
//kotlinOptions.moduleKind = 'commonjs'
//kotlinOptions.main = "main"
}