Update build scripts and configure multiplatform project

Added a Gradle build script for the test-app module with Kotlin Multiplatform configuration, including JS and JVM targets. Upgraded Kotlin plugin version to 2.1.10, updated dependencies, and adjusted the JS distribution path. Renamed the JS file in UndertowServer configuration for accuracy.
This commit is contained in:
2025-03-17 18:13:58 +00:00
parent 4259b054b3
commit bcc88f71e4
4 changed files with 62 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
plugins {
kotlin("multiplatform") version "2.1.0"
kotlin("multiplatform") version "2.1.10"
`maven-publish`
signing
}

59
test-app/build.gradle.kts Normal file
View File

@@ -0,0 +1,59 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
plugins {
kotlin("multiplatform") version "2.1.10"
}
group = "nl.astraeus"
version = "2.0.0-SNAPSHOT"
repositories {
mavenCentral()
maven {
setUrl("https://gitea.astraeus.nl/api/packages/rnentjes/maven")
}
maven {
setUrl("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
}
}
kotlin {
js {
compilerOptions {
target.set("es2015")
}
browser {
commonWebpackConfig {
sourceMaps = true
}
binaries.executable()
distribution {
outputDirectory.set(File("$projectDir/web/"))
}
}
}
jvm {
withJava()
}
sourceSets {
val commonMain by getting {
dependencies {
api("nl.astraeus:vst-ui-base")
}
}
val jsMain by getting {
dependencies {
api("nl.astraeus:kotlin-komponent:1.2.4")
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting
}
}

1
test-app/data/db.txt Normal file
View File

@@ -0,0 +1 @@
The db will be created in this directory

View File

@@ -16,6 +16,6 @@ fun main() {
UndertowServer.start(
"Vst UI-base Test",
"/vst-ui-base-test.js"
"/test-app.js"
)
}