2020-05-16 19:26:28 +03:00
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME
|
2019-12-26 22:21:10 +03:00
|
|
|
|
|
|
|
plugins {
|
2021-02-23 21:47:18 +03:00
|
|
|
id("ru.mipt.npm.gradle.mpp")
|
2020-10-02 19:09:25 +03:00
|
|
|
application
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "ru.mipt.npm"
|
|
|
|
|
2020-10-02 19:09:25 +03:00
|
|
|
val ktorVersion: String by rootProject.extra
|
2019-12-30 11:40:37 +03:00
|
|
|
|
2020-10-02 19:09:25 +03:00
|
|
|
kscience {
|
2021-02-16 14:49:15 +03:00
|
|
|
// useSerialization()
|
2020-10-02 19:09:25 +03:00
|
|
|
application()
|
|
|
|
}
|
2019-12-26 22:21:10 +03:00
|
|
|
|
2020-10-02 19:09:25 +03:00
|
|
|
kotlin {
|
|
|
|
afterEvaluate {
|
|
|
|
val jsBrowserDistribution by tasks.getting
|
2019-12-30 17:14:42 +03:00
|
|
|
|
2020-10-02 19:09:25 +03:00
|
|
|
jvm {
|
|
|
|
withJava()
|
|
|
|
compilations[MAIN_COMPILATION_NAME]?.apply {
|
|
|
|
tasks.getByName<ProcessResources>(processResourcesTaskName) {
|
|
|
|
dependsOn(jsBrowserDistribution)
|
|
|
|
afterEvaluate {
|
|
|
|
from(jsBrowserDistribution)
|
|
|
|
}
|
2020-04-13 17:09:44 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-30 17:14:42 +03:00
|
|
|
}
|
2020-10-02 19:09:25 +03:00
|
|
|
}
|
2019-12-30 17:14:42 +03:00
|
|
|
|
2019-12-26 22:21:10 +03:00
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
2020-08-08 09:40:07 +03:00
|
|
|
implementation(project(":visionforge-solid"))
|
2019-12-30 11:40:37 +03:00
|
|
|
}
|
|
|
|
}
|
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")
|
2020-03-23 22:19:52 +03:00
|
|
|
implementation("io.ktor:ktor-server-cio:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-serialization:$ktorVersion")
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
2020-03-16 22:24:57 +03:00
|
|
|
jsMain {
|
|
|
|
dependencies {
|
2020-05-16 19:26:28 +03:00
|
|
|
implementation(project(":ui:bootstrap"))
|
2020-03-23 22:19:52 +03:00
|
|
|
implementation("io.ktor:ktor-client-js:$ktorVersion")
|
2020-11-09 19:51:57 +03:00
|
|
|
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
|
2020-11-21 11:17:18 +03:00
|
|
|
implementation(project(":visionforge-threejs"))
|
2019-12-31 16:06:38 +03:00
|
|
|
}
|
|
|
|
}
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2021-02-23 21:47:18 +03:00
|
|
|
mainClass.set("ru.mipt.npm.gradle.muon.monitor.server.MMServerKt")
|
2020-08-05 15:24:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
distributions {
|
|
|
|
main {
|
|
|
|
contents {
|
|
|
|
from("$buildDir/libs") {
|
|
|
|
rename("${rootProject.name}-jvm", rootProject.name)
|
|
|
|
into("lib")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-05-16 19:26:28 +03:00
|
|
|
}
|