2019-12-26 22:21:10 +03:00
|
|
|
import scientifik.useSerialization
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("scientifik.mpp")
|
2019-12-31 16:06:38 +03:00
|
|
|
//id("org.openjfx.javafxplugin")
|
2019-12-26 22:21:10 +03:00
|
|
|
id("application")
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "ru.mipt.npm"
|
|
|
|
|
|
|
|
useSerialization()
|
|
|
|
|
2019-12-30 11:40:37 +03:00
|
|
|
val ktor_version = "1.3.0-rc"
|
|
|
|
|
2019-12-26 22:21:10 +03:00
|
|
|
kotlin {
|
|
|
|
|
|
|
|
js {
|
|
|
|
browser {
|
|
|
|
webpackTask {
|
2019-12-28 22:11:43 +03:00
|
|
|
sourceMaps = true
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-30 17:14:42 +03:00
|
|
|
val installJS = tasks.getByName<Copy>("installJsDist")
|
|
|
|
|
|
|
|
jvm {
|
|
|
|
withJava()
|
|
|
|
compilations.findByName("main").apply {
|
|
|
|
tasks.getByName<ProcessResources>("jvmProcessResources") {
|
|
|
|
dependsOn(installJS)
|
|
|
|
afterEvaluate {
|
|
|
|
from(installJS.destinationDir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-26 22:21:10 +03:00
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
2019-12-30 11:40:37 +03:00
|
|
|
implementation(project(":dataforge-vis-spatial"))
|
|
|
|
}
|
|
|
|
}
|
2019-12-30 17:14:42 +03:00
|
|
|
jvmMain {
|
2019-12-30 11:40:37 +03:00
|
|
|
dependencies {
|
|
|
|
implementation("org.apache.commons:commons-math3:3.6.1")
|
|
|
|
implementation("io.ktor:ktor-server-cio:$ktor_version")
|
2019-12-30 17:14:42 +03:00
|
|
|
implementation("io.ktor:ktor-serialization:$ktor_version")
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
2019-12-31 16:06:38 +03:00
|
|
|
jsMain{
|
|
|
|
dependencies{
|
|
|
|
implementation("io.ktor:ktor-client-js:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-client-serialization-js:$ktor_version")
|
|
|
|
implementation(npm("text-encoding"))
|
|
|
|
implementation(npm("abort-controller"))
|
|
|
|
}
|
|
|
|
}
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2019-12-30 17:14:42 +03:00
|
|
|
mainClassName = "ru.mipt.npm.muon.monitor.server/MMServerKt"
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
|
2019-12-31 16:06:38 +03:00
|
|
|
//configure<JavaFXOptions> {
|
|
|
|
// modules("javafx.controls")
|
|
|
|
//}
|