visionforge-event-display-demo/build.gradle.kts

76 lines
2.1 KiB
Plaintext
Raw Normal View History

2023-12-09 00:36:23 +03:00
plugins {
kotlin("multiplatform") version "1.9.20-RC"
application
}
group = "center.sciprog"
version = "1.0-SNAPSHOT"
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
}
kotlin {
jvm {
jvmToolchain(8)
withJava()
testRuns.named("test") {
executionTask.configure {
useJUnitPlatform()
}
}
}
js {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport {
enabled.set(true)
}
}
}
}
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-server-netty:2.3.2")
implementation("io.ktor:ktor-server-html-builder-jvm:2.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2")
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
implementation("space.kscience:visionforge-threejs:0.3.0-dev-14")
implementation("space.kscience:visionforge-core:0.3.0-dev-14")
}
}
val jsTest by getting
}
}
application {
mainClass.set("center.sciprog.application.ServerKt")
}
tasks.named<Copy>("jvmProcessResources") {
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
from(jsBrowserDistribution)
}
tasks.named<JavaExec>("run") {
dependsOn(tasks.named<Jar>("jvmJar"))
classpath(tasks.named<Jar>("jvmJar"))
}