2019-12-26 22:21:10 +03:00
|
|
|
plugins {
|
2022-08-12 22:16:06 +03:00
|
|
|
id("space.kscience.gradle.mpp")
|
2020-10-02 19:09:25 +03:00
|
|
|
application
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "ru.mipt.npm"
|
|
|
|
|
2021-12-29 13:17:57 +03:00
|
|
|
val ktorVersion: String = npmlibs.versions.ktor.get()
|
2019-12-30 11:40:37 +03:00
|
|
|
|
2020-10-02 19:09:25 +03:00
|
|
|
kscience {
|
2021-06-04 20:01:50 +03:00
|
|
|
useCoroutines()
|
2021-02-28 15:01:36 +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 {
|
2021-03-10 21:58:28 +03:00
|
|
|
jvm {
|
|
|
|
withJava()
|
|
|
|
}
|
2021-08-17 15:26:31 +03:00
|
|
|
js {
|
|
|
|
useCommonJs()
|
|
|
|
browser {
|
|
|
|
commonWebpackConfig {
|
2022-08-14 17:22:10 +03:00
|
|
|
cssSupport {
|
|
|
|
enabled = false
|
|
|
|
}
|
2021-08-17 15:26:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-03-10 21:58:28 +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")
|
2022-04-13 17:08:25 +03:00
|
|
|
implementation("io.ktor:ktor-server-cio:${ktorVersion}")
|
|
|
|
implementation("io.ktor:ktor-server-content-negotiation:${ktorVersion}")
|
|
|
|
implementation("io.ktor:ktor-serialization-kotlinx-json:${ktorVersion}")
|
2022-08-13 12:45:10 +03:00
|
|
|
implementation("ch.qos.logback:logback-classic:1.2.11")
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
2020-03-16 22:24:57 +03:00
|
|
|
jsMain {
|
|
|
|
dependencies {
|
2021-08-17 15:26:31 +03:00
|
|
|
implementation(project(":ui:ring"))
|
2020-11-21 11:17:18 +03:00
|
|
|
implementation(project(":visionforge-threejs"))
|
2021-12-29 13:17:57 +03:00
|
|
|
//implementation(devNpm("webpack-bundle-analyzer", "4.4.0"))
|
2019-12-31 16:06:38 +03:00
|
|
|
}
|
|
|
|
}
|
2019-12-26 22:21:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2021-02-28 15:01:36 +03:00
|
|
|
mainClass.set("ru.mipt.npm.muon.monitor.server.MMServerKt")
|
2020-08-05 15:24:39 +03:00
|
|
|
}
|
|
|
|
|
2022-08-14 17:22:10 +03:00
|
|
|
val jsBrowserDistribution by tasks.getting
|
|
|
|
val jsBrowserDevelopmentExecutableDistribution by tasks.getting
|
|
|
|
|
|
|
|
val devMode = rootProject.findProperty("visionforge.development") as? Boolean
|
|
|
|
?: rootProject.version.toString().contains("dev")
|
|
|
|
|
|
|
|
tasks.getByName<ProcessResources>("jvmProcessResources") {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
if (devMode) {
|
|
|
|
dependsOn(jsBrowserDevelopmentExecutableDistribution)
|
|
|
|
from(jsBrowserDevelopmentExecutableDistribution)
|
|
|
|
} else {
|
|
|
|
dependsOn(jsBrowserDistribution)
|
|
|
|
from(jsBrowserDistribution)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-10 21:58:28 +03:00
|
|
|
//distributions {
|
|
|
|
// main {
|
|
|
|
// contents {
|
|
|
|
// from("$buildDir/libs") {
|
|
|
|
// rename("${rootProject.name}-jvm", rootProject.name)
|
|
|
|
// into("lib")
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|