visionforge/dataforge-vis-spatial-js/build.gradle.kts

63 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-03-08 11:55:01 +03:00
import org.jetbrains.kotlin.gradle.frontend.KotlinFrontendExtension
import org.jetbrains.kotlin.gradle.frontend.npm.NpmExtension
import org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension
plugins {
id("kotlin2js")
id("kotlin-dce-js")
id("org.jetbrains.kotlin.frontend")
}
2019-04-02 20:24:31 +03:00
val kotlinVersion: String by rootProject.extra
2019-03-08 11:55:01 +03:00
dependencies {
2019-04-03 21:44:10 +03:00
api(project(":dataforge-vis-spatial"))
2019-03-17 16:02:59 +03:00
implementation("info.laht.threekt:threejs-wrapper:0.88-npm-2")
testCompile("org.jetbrains.kotlin:kotlin-test-js:$kotlinVersion")
2019-03-08 11:55:01 +03:00
}
configure<KotlinFrontendExtension> {
downloadNodeJsVersion = "latest"
configure<NpmExtension> {
2019-03-09 11:39:01 +03:00
dependency("three-full")
2019-03-08 11:55:01 +03:00
dependency("style-loader")
devDependency("karma")
}
sourceMaps = true
bundle("webpack") {
this as WebPackExtension
bundleName = "main"
proxyUrl = "http://localhost:8080"
contentPath = file("src/main/web")
sourceMapEnabled = true
//mode = "production"
mode = "development"
}
}
tasks{
compileKotlin2Js{
kotlinOptions{
metaInfo = true
outputFile = "${project.buildDir.path}/js/${project.name}.js"
sourceMap = true
moduleKind = "umd"
main = "call"
2019-03-17 16:02:59 +03:00
kotlinOptions.sourceMapEmbedSources = "always"
2019-03-08 11:55:01 +03:00
}
}
compileTestKotlin2Js{
kotlinOptions{
metaInfo = true
outputFile = "${project.buildDir.path}/js/${project.name}-test.js"
sourceMap = true
moduleKind = "umd"
2019-03-17 16:02:59 +03:00
kotlinOptions.sourceMapEmbedSources = "always"
2019-03-08 11:55:01 +03:00
}
}
}