56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
// shared/build.gradle.kts
|
|
@file:OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
|
|
|
|
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
kotlin {
|
|
jvm()
|
|
|
|
wasmJs {
|
|
|
|
var isMpp: Boolean = false // Beispiel: Deine aktuelle Zuweisung
|
|
|
|
@Deprecated("Use getMpp() instead", ReplaceWith("getMpp()"))
|
|
fun isMpp(): Boolean = isMpp
|
|
|
|
fun getMpp(): Boolean = isMpp
|
|
|
|
browser {
|
|
val rootDirPath = project.rootDir.path
|
|
val projectDirPath = project.projectDir.path
|
|
commonWebpackConfig {
|
|
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
|
static = (static ?: mutableListOf()).apply {
|
|
// Serve sources to debug inside browser
|
|
add(rootDirPath)
|
|
add(projectDirPath)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
dependencies {
|
|
// Multiplatform-Abhängigkeiten
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.kotlinx.datetime)
|
|
implementation(libs.uuid)
|
|
implementation(libs.bignum)
|
|
}
|
|
}
|
|
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
}
|
|
}
|