visionforge/visionforge-threejs/visionforge-threejs-server/build.gradle.kts

53 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2020-12-12 21:19:41 +03:00
plugins {
2022-08-12 22:16:06 +03:00
id("space.kscience.gradle.mpp")
2022-08-14 17:22:10 +03:00
}
2020-12-12 21:19:41 +03:00
val ktorVersion: String by rootProject.extra
kotlin {
2022-08-14 17:22:10 +03:00
js(IR) {
2020-12-12 21:19:41 +03:00
browser {
webpackTask {
this.outputFileName = "js/visionforge-three.js"
}
}
binaries.executable()
}
sourceSets {
commonMain {
dependencies {
api(project(":visionforge-solid"))
}
}
jvmMain {
dependencies {
api(project(":visionforge-server"))
}
}
jsMain {
dependencies {
api(project(":visionforge-threejs"))
}
}
}
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)
}
}