refactor(build): enable Wasm by default and refactor modules for improved KMP compatibility

Enabled Wasm target across all relevant modules and removed conditional enablement logic. Refactored `core:core-utils` to move JVM-specific code to a new `backend:infrastructure:persistence` module for strict KMP compliance. Updated dependencies, adjusted Gradle configurations, and resolved circular dependencies.
This commit is contained in:
2026-01-09 14:36:10 +01:00
parent 13cfc37b37
commit 35da070893
22 changed files with 513 additions and 526 deletions
@@ -9,8 +9,6 @@ version = "1.0.0"
kotlin {
// Toolchain is now handled centrally in the root build.gradle.kts
val enableWasm = providers.gradleProperty("enableWasm").orNull == "true"
// JVM target for backend usage
jvm()
@@ -20,12 +18,10 @@ kotlin {
// no need for binaries.executable() in a library
}
// Optional Wasm target for browser clients
if (enableWasm) {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
wasmJs {
browser()
}
// Wasm enabled by default
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
wasmJs {
browser()
}
sourceSets {
@@ -16,22 +16,21 @@ dependencies {
// === Project Dependencies ===
implementation(projects.backend.services.ping.pingApi)
implementation(projects.platform.platformDependencies)
// NEU: Zugriff auf die verschobenen DatabaseUtils
implementation(projects.backend.infrastructure.persistence)
// === Spring Boot & Cloud ===
implementation(libs.bundles.spring.boot.service.complete)
// WICHTIG: Da wir JPA (blockierend) nutzen, brauchen wir Spring MVC (nicht WebFlux)
implementation(libs.spring.boot.starter.web)
// KORREKTUR: Bundle aufgelöst, da Accessor fehlschlägt
// libs.bundles.spring.cloud.gateway -> spring-cloud-gateway
implementation(libs.spring.cloud.starter.gateway.server.webflux)
// Service Discovery
implementation(libs.spring.cloud.starter.consul.discovery)
// === Database & Persistence ===
implementation(libs.bundles.database.complete)
// === Resilience ===
// KORREKTUR: Bundle aufgelöst
implementation(libs.resilience4j.spring.boot3)
implementation(libs.resilience4j.reactor)
implementation(libs.spring.boot.starter.aop)