2020-03-23 22:19:52 +03:00
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform")
|
2021-12-31 13:59:27 +03:00
|
|
|
kotlin("jupyter.api")
|
|
|
|
id("com.github.johnrengelman.shadow") version "7.1.2"
|
2023-05-29 21:38:30 +03:00
|
|
|
// application
|
2020-03-23 22:19:52 +03:00
|
|
|
}
|
|
|
|
|
2021-12-31 13:59:27 +03:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
maven("https://repo.kotlin.link")
|
2020-03-23 22:19:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
2024-04-20 12:13:43 +03:00
|
|
|
jvmToolchain(11)
|
2020-12-28 22:39:37 +03:00
|
|
|
js(IR) {
|
|
|
|
browser {
|
|
|
|
webpackTask {
|
2023-12-27 12:01:55 +03:00
|
|
|
cssSupport{
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
scssSupport{
|
|
|
|
enabled = true
|
|
|
|
}
|
2023-10-18 11:30:27 +03:00
|
|
|
mainOutputFileName.set("js/visionforge-playground.js")
|
2020-12-28 22:39:37 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
binaries.executable()
|
|
|
|
}
|
|
|
|
|
2021-12-31 13:59:27 +03:00
|
|
|
jvm {
|
2023-05-29 21:38:30 +03:00
|
|
|
// withJava()
|
2024-04-20 12:13:43 +03:00
|
|
|
compilerOptions {
|
|
|
|
freeCompilerArgs.addAll("-Xjvm-default=all", "-Xopt-in=kotlin.RequiresOptIn", "-Xlambdas=indy", "-Xcontext-receivers")
|
|
|
|
|
2020-12-12 21:19:41 +03:00
|
|
|
}
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
}
|
2020-12-28 22:39:37 +03:00
|
|
|
|
2020-03-23 22:19:52 +03:00
|
|
|
sourceSets {
|
2020-12-28 22:39:37 +03:00
|
|
|
val commonMain by getting {
|
2020-03-23 22:19:52 +03:00
|
|
|
dependencies {
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation(projects.visionforgeSolid)
|
2024-06-04 22:47:56 +03:00
|
|
|
// implementation(projects.visionforgePlotly)
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation(projects.visionforgeMarkdown)
|
2024-06-04 22:47:56 +03:00
|
|
|
// implementation(projects.visionforgeTables)
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation(projects.cernRootLoader)
|
2023-07-22 15:39:43 +03:00
|
|
|
api(projects.visionforgeJupyter.visionforgeJupyterCommon)
|
2020-12-06 19:16:48 +03:00
|
|
|
}
|
|
|
|
}
|
2020-12-28 22:39:37 +03:00
|
|
|
|
2021-12-31 13:59:27 +03:00
|
|
|
val jsMain by getting {
|
2020-12-06 19:16:48 +03:00
|
|
|
dependencies {
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation(projects.visionforgeThreejs)
|
2022-01-07 12:29:43 +03:00
|
|
|
compileOnly(npm("webpack-bundle-analyzer","4.5.0"))
|
2020-12-06 19:16:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-31 13:59:27 +03:00
|
|
|
val jvmMain by getting {
|
2020-12-06 19:16:48 +03:00
|
|
|
dependencies {
|
2023-07-19 22:25:32 +03:00
|
|
|
implementation("io.ktor:ktor-server-cio:${spclibs.versions.ktor.get()}")
|
|
|
|
implementation(projects.visionforgeGdml)
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation(projects.visionforgeServer)
|
2023-05-29 09:53:56 +03:00
|
|
|
implementation(spclibs.logback.classic)
|
2022-01-02 14:28:24 +03:00
|
|
|
implementation("com.github.Ricky12Awesome:json-schema-serialization:0.6.6")
|
2020-03-23 22:19:52 +03:00
|
|
|
}
|
|
|
|
}
|
2022-01-07 12:29:43 +03:00
|
|
|
all {
|
|
|
|
languageSettings.optIn("space.kscience.dataforge.misc.DFExperimental")
|
|
|
|
}
|
2020-03-23 22:19:52 +03:00
|
|
|
}
|
|
|
|
}
|
2021-12-31 13:59:27 +03:00
|
|
|
|
2022-01-02 19:43:31 +03:00
|
|
|
val jsBrowserDistribution = tasks.getByName("jsBrowserDistribution")
|
|
|
|
|
|
|
|
tasks.getByName<ProcessResources>("jvmProcessResources") {
|
|
|
|
dependsOn(jsBrowserDistribution)
|
|
|
|
from(jsBrowserDistribution) {
|
|
|
|
exclude("**/*.js.map")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val processJupyterApiResources by tasks.getting(org.jetbrains.kotlinx.jupyter.api.plugin.tasks.JupyterApiResourcesTask::class) {
|
2021-12-31 13:59:27 +03:00
|
|
|
libraryProducers = listOf("space.kscience.visionforge.examples.VisionForgePlayGroundForJupyter")
|
|
|
|
}
|
|
|
|
|
2023-05-29 21:38:30 +03:00
|
|
|
tasks.findByName("shadowJar")?.dependsOn(processJupyterApiResources)
|
|
|
|
|
|
|
|
//application{
|
|
|
|
// mainClass.set("space.kscience.visionforge.examples.ShapesKt")
|
|
|
|
//}
|