chore: refactor Gradle config, standardize Kotlin MPP plugin usage, and update dependencies
- Unified plugin application across modules using `alias(libs.plugins.*)` instead of hardcoded IDs. - Removed redundant JVM/JS source map tasks, improving Gradle and Docker build consistency. - Updated dependencies, including `logback` and Webpack `copy-webpack-plugin`, and added contextual documentation. - Added frontend architecture diagram in PlantUML (`docs/01_Architecture/Reference`), standardizing feature-core-shell dependencies.
This commit is contained in:
parent
c613acb91d
commit
03e1484dd3
|
|
@ -11,18 +11,15 @@ plugins {
|
||||||
java {
|
java {
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
|
toolchain {
|
||||||
|
languageVersion.set(JavaLanguageVersion.of(25))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion.set(JavaLanguageVersion.of(25))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
||||||
api(platform(projects.platform.platformBom))
|
api(platform(projects.platform.platformBom))
|
||||||
|
|
|
||||||
|
|
@ -31,28 +31,10 @@ dependencies {
|
||||||
// Resilience (Reactive) - WICHTIG: Reactor-Variante für WebFlux!
|
// Resilience (Reactive) - WICHTIG: Reactor-Variante für WebFlux!
|
||||||
implementation(libs.spring.cloud.starter.circuitbreaker.reactor.resilience4j)
|
implementation(libs.spring.cloud.starter.circuitbreaker.reactor.resilience4j)
|
||||||
|
|
||||||
implementation(libs.kotlin.logging.jvm)
|
|
||||||
implementation(libs.logback.classic)
|
|
||||||
implementation(libs.logback.core)
|
|
||||||
implementation(libs.jackson.module.kotlin)
|
|
||||||
implementation(libs.jackson.datatype.jsr310)
|
|
||||||
|
|
||||||
implementation(libs.spring.boot.starter.data.redis)
|
implementation(libs.spring.boot.starter.data.redis)
|
||||||
|
|
||||||
implementation(libs.micrometer.tracing.bridge.brave)
|
implementation(libs.micrometer.tracing.bridge.brave)
|
||||||
|
|
||||||
testImplementation(projects.platform.platformTesting)
|
testImplementation(projects.platform.platformTesting)
|
||||||
testImplementation(libs.junit.jupiter.api)
|
|
||||||
testImplementation(libs.junit.jupiter.engine)
|
|
||||||
testImplementation(libs.junit.jupiter.params)
|
|
||||||
testImplementation(libs.junit.platform.launcher)
|
|
||||||
testImplementation(libs.mockk)
|
|
||||||
testImplementation(libs.assertj.core)
|
|
||||||
testImplementation(libs.kotlinx.coroutines.test)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,10 @@ dependencies {
|
||||||
implementation(libs.micrometer.prometheus)
|
implementation(libs.micrometer.prometheus)
|
||||||
// Stellt alle Test-Abhängigkeiten gebündelt bereit.
|
// Stellt alle Test-Abhängigkeiten gebündelt bereit.
|
||||||
testImplementation(projects.platform.platformTesting)
|
testImplementation(projects.platform.platformTesting)
|
||||||
testImplementation(libs.logback.classic) // SLF4J provider for tests
|
|
||||||
|
// Logging explizit für Tests erzwingen, um Versionskonflikte zu vermeiden
|
||||||
|
testImplementation(libs.logback.classic)
|
||||||
|
testImplementation(libs.logback.core)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@ dependencies {
|
||||||
implementation(libs.exposed.json)
|
implementation(libs.exposed.json)
|
||||||
implementation(libs.exposed.kotlin.datetime)
|
implementation(libs.exposed.kotlin.datetime)
|
||||||
|
|
||||||
// Logging
|
|
||||||
implementation(libs.slf4j.api)
|
|
||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
testImplementation(projects.platform.platformTesting)
|
testImplementation(projects.platform.platformTesting)
|
||||||
testImplementation(libs.bundles.testing.jvm)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,7 @@ dependencies {
|
||||||
// Web (for CORS config)
|
// Web (for CORS config)
|
||||||
implementation(libs.spring.web)
|
implementation(libs.spring.web)
|
||||||
|
|
||||||
// Utils
|
|
||||||
implementation(libs.slf4j.api)
|
|
||||||
implementation(libs.jackson.module.kotlin)
|
|
||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
testImplementation(projects.platform.platformTesting)
|
testImplementation(projects.platform.platformTesting)
|
||||||
testImplementation(libs.spring.security.test)
|
testImplementation(libs.spring.security.test)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,11 @@ subprojects {
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
jvmTarget.set(JvmTarget.JVM_25)
|
||||||
freeCompilerArgs.add("-Xannotation-default-target=param-property")
|
freeCompilerArgs.addAll(
|
||||||
|
"-opt-in=kotlin.RequiresOptIn",
|
||||||
|
"-Xannotation-default-target=param-property",
|
||||||
|
"-Xexpect-actual-classes",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -8,15 +7,12 @@ group = "at.mocode"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
// Toolchain is now handled centrally in the root build.gradle.kts
|
|
||||||
|
|
||||||
// JVM target for backend usage
|
// JVM target for backend usage
|
||||||
jvm()
|
jvm()
|
||||||
|
|
||||||
// JS target for frontend usage (Compose/Browser)
|
// JS target for frontend usage (Compose/Browser)
|
||||||
js {
|
js {
|
||||||
browser()
|
browser()
|
||||||
// no need for binaries.executable() in a library
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wasm enabled by default
|
// Wasm enabled by default
|
||||||
|
|
|
||||||
37
docs/01_Architecture/Reference/Fontend-Module.puml
Normal file
37
docs/01_Architecture/Reference/Fontend-Module.puml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
@startuml
|
||||||
|
!theme vibrant
|
||||||
|
|
||||||
|
package "Frontend" {
|
||||||
|
package "Shells" <<Cloud>> {
|
||||||
|
[Android App]
|
||||||
|
[Desktop App]
|
||||||
|
}
|
||||||
|
|
||||||
|
package "Features" <<Database>> {
|
||||||
|
[Feature A]
|
||||||
|
[Feature B]
|
||||||
|
[Feature C]
|
||||||
|
}
|
||||||
|
|
||||||
|
package "Core" <<Component>> {
|
||||||
|
[UI Components]
|
||||||
|
[Design System]
|
||||||
|
[Utils]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Android App] --> [Feature A]
|
||||||
|
[Android App] --> [Feature B]
|
||||||
|
[Desktop App] --> [Feature A]
|
||||||
|
[Desktop App] --> [Feature C]
|
||||||
|
|
||||||
|
[Feature A] ..> [Feature B] : (optional dependency)
|
||||||
|
|
||||||
|
[Feature A] --> [Core]
|
||||||
|
[Feature B] --> [Core]
|
||||||
|
[Feature C] --> [Core]
|
||||||
|
|
||||||
|
[Android App] --> [Core]
|
||||||
|
[Desktop App] --> [Core]
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.composeMultiplatform)
|
alias(libs.plugins.composeMultiplatform)
|
||||||
alias(libs.plugins.composeCompiler)
|
alias(libs.plugins.composeCompiler)
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
|
|
@ -13,11 +10,9 @@ version = "1.0.0"
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
|
|
||||||
js {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// CHANGED: Use nodejs() instead of browser() to minimize NodeJsRootPlugin conflicts in Docker
|
// Use nodejs() to minimize NodeJsRootPlugin conflicts in Docker
|
||||||
// while still satisfying the "configured for JS usage" requirement.
|
|
||||||
nodejs()
|
nodejs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,13 +65,3 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
|
||||||
freeCompilerArgs.addAll(
|
|
||||||
"-opt-in=kotlin.RequiresOptIn",
|
|
||||||
"-Xexpect-actual-classes"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,15 @@
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.composeMultiplatform)
|
|
||||||
alias(libs.plugins.composeCompiler)
|
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
|
alias(libs.plugins.composeCompiler)
|
||||||
|
alias(libs.plugins.composeMultiplatform)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js(IR) {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
@ -25,9 +19,7 @@ kotlin {
|
||||||
implementation(compose.material3)
|
implementation(compose.material3)
|
||||||
implementation(compose.ui)
|
implementation(compose.ui)
|
||||||
implementation(compose.components.resources)
|
implementation(compose.components.resources)
|
||||||
implementation(libs.kotlinx.coroutines.core)
|
implementation(libs.bundles.kmp.common)
|
||||||
implementation(libs.kotlinx.serialization.json)
|
|
||||||
implementation(libs.kotlinx.datetime)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinMultiplatform)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
|
|
@ -27,9 +26,4 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
// KMP Compile-Optionen sind jetzt zentral in der Root build.gradle.kts definiert
|
||||||
compilerOptions {
|
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
|
||||||
freeCompilerArgs.addAll("-opt-in=kotlin.RequiresOptIn")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
alias(libs.plugins.sqldelight)
|
alias(libs.plugins.sqldelight)
|
||||||
}
|
}
|
||||||
|
|
@ -13,12 +12,7 @@ kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
@ -35,7 +29,7 @@ kotlin {
|
||||||
|
|
||||||
jsMain.dependencies {
|
jsMain.dependencies {
|
||||||
implementation(libs.sqldelight.driver.web)
|
implementation(libs.sqldelight.driver.web)
|
||||||
implementation(npm("@sqlite.org/sqlite-wasm", "3.51.1-build2"))
|
implementation(npm("@sqlite.org/sqlite-wasm", libs.versions.sqliteWasm.get()))
|
||||||
}
|
}
|
||||||
|
|
||||||
commonTest.dependencies {
|
commonTest.dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Dieses Modul definiert nur die Navigationsrouten.
|
* Dieses Modul definiert nur die Navigationsrouten.
|
||||||
* Es ist noch simpler.
|
|
||||||
*/
|
*/
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "at.mocode.clients.shared"
|
group = "at.mocode.clients.shared"
|
||||||
|
|
@ -14,18 +12,13 @@ kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain.dependencies {
|
commonMain.dependencies {
|
||||||
// Depend on core domain for User/Role types used by navigation API
|
// Depend on core domain for User/Role types used by navigation API
|
||||||
implementation(project(":frontend:core:domain"))
|
implementation(projects.frontend.core.domain)
|
||||||
}
|
}
|
||||||
commonTest.dependencies {
|
commonTest.dependencies {
|
||||||
implementation(libs.kotlin.test)
|
implementation(libs.kotlin.test)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -13,12 +11,7 @@ kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
@ -41,10 +34,3 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
|
||||||
freeCompilerArgs.addAll("-opt-in=kotlin.RequiresOptIn")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,13 @@
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js(IR) {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dieses Modul kapselt die gesamte UI und Logik für das Ping-Feature.
|
* Dieses Modul kapselt die gesamte UI und Logik für das Ping-Feature.
|
||||||
*/
|
*/
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.composeMultiplatform)
|
alias(libs.plugins.composeMultiplatform)
|
||||||
alias(libs.plugins.composeCompiler)
|
alias(libs.plugins.composeCompiler)
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
|
|
@ -18,12 +15,7 @@ kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
binaries.library()
|
binaries.library()
|
||||||
// Re-enabled browser environment after Root NodeJs fix
|
browser()
|
||||||
browser {
|
|
||||||
testTask {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
@ -70,12 +62,3 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
|
||||||
freeCompilerArgs.addAll(
|
|
||||||
"-opt-in=kotlin.RequiresOptIn"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11,16 +10,13 @@ import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||||
* setzt sie zu einer lauffähigen Anwendung zusammen.
|
* setzt sie zu einer lauffähigen Anwendung zusammen.
|
||||||
*/
|
*/
|
||||||
plugins {
|
plugins {
|
||||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
id("org.jetbrains.kotlin.multiplatform")
|
|
||||||
alias(libs.plugins.composeCompiler)
|
alias(libs.plugins.composeCompiler)
|
||||||
alias(libs.plugins.composeMultiplatform)
|
alias(libs.plugins.composeMultiplatform)
|
||||||
alias(libs.plugins.kotlinSerialization)
|
alias(libs.plugins.kotlinSerialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
// Toolchain is now handled centrally in the root build.gradle.kts
|
|
||||||
|
|
||||||
// JVM Target für Desktop
|
// JVM Target für Desktop
|
||||||
jvm {
|
jvm {
|
||||||
binaries {
|
binaries {
|
||||||
|
|
@ -31,7 +27,7 @@ kotlin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// JavaScript Target für Web
|
// JavaScript Target für Web
|
||||||
js(IR) {
|
js {
|
||||||
browser {
|
browser {
|
||||||
commonWebpackConfig {
|
commonWebpackConfig {
|
||||||
cssSupport { enabled = true }
|
cssSupport { enabled = true }
|
||||||
|
|
@ -55,13 +51,6 @@ kotlin {
|
||||||
runTask {
|
runTask {
|
||||||
mainOutputFileName.set("web-app.js")
|
mainOutputFileName.set("web-app.js")
|
||||||
}
|
}
|
||||||
// Browser-Tests komplett deaktivieren (Configuration Cache kompatibel)
|
|
||||||
testTask {
|
|
||||||
useKarma {
|
|
||||||
useChromeHeadless()
|
|
||||||
environment("CHROME_BIN", "/usr/bin/google-chrome-stable")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
binaries.executable()
|
binaries.executable()
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +58,6 @@ kotlin {
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain.dependencies {
|
commonMain.dependencies {
|
||||||
// Shared modules
|
// Shared modules
|
||||||
// implementation(projects.frontend.shared) // REMOVED: Shared module deleted
|
|
||||||
implementation(projects.frontend.core.domain)
|
implementation(projects.frontend.core.domain)
|
||||||
implementation(projects.frontend.core.designSystem)
|
implementation(projects.frontend.core.designSystem)
|
||||||
implementation(projects.frontend.core.navigation)
|
implementation(projects.frontend.core.navigation)
|
||||||
|
|
@ -92,7 +80,7 @@ kotlin {
|
||||||
implementation(compose.components.resources)
|
implementation(compose.components.resources)
|
||||||
implementation(compose.materialIconsExtended)
|
implementation(compose.materialIconsExtended)
|
||||||
|
|
||||||
// Bundles (Cleaned up dependencies)
|
// Bundles
|
||||||
implementation(libs.bundles.kmp.common) // Coroutines, Serialization, DateTime
|
implementation(libs.bundles.kmp.common) // Coroutines, Serialization, DateTime
|
||||||
implementation(libs.bundles.compose.common) // ViewModel & Lifecycle
|
implementation(libs.bundles.compose.common) // ViewModel & Lifecycle
|
||||||
}
|
}
|
||||||
|
|
@ -106,7 +94,7 @@ kotlin {
|
||||||
jsMain.dependencies {
|
jsMain.dependencies {
|
||||||
implementation(compose.html.core)
|
implementation(compose.html.core)
|
||||||
// Benötigt für custom webpack config (wasm.js)
|
// Benötigt für custom webpack config (wasm.js)
|
||||||
implementation(devNpm("copy-webpack-plugin", "11.0.0"))
|
implementation(devNpm("copy-webpack-plugin", libs.versions.copyWebpackPlugin.get()))
|
||||||
}
|
}
|
||||||
|
|
||||||
commonTest.dependencies {
|
commonTest.dependencies {
|
||||||
|
|
@ -115,25 +103,7 @@ kotlin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// KMP Compile-Optionen
|
// Duplicate-Handling für Distribution (Zentralisiert in Root build.gradle.kts, aber hier spezifisch für Distribution Tasks)
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget.set(JvmTarget.JVM_25)
|
|
||||||
freeCompilerArgs.addAll(
|
|
||||||
"-opt-in=kotlin.RequiresOptIn",
|
|
||||||
"-Xskip-metadata-version-check", // Für bleeding-edge Versionen
|
|
||||||
// Suppress beta warning for expect/actual declarations used in this module
|
|
||||||
"-Xexpect-actual-classes"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Kotlin/JS source maps
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Production source maps must remain enabled for browser debugging.
|
|
||||||
|
|
||||||
// Configure a duplicate handling strategy for distribution tasks
|
|
||||||
tasks.withType<Tar> {
|
tasks.withType<Tar> {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
@ -142,15 +112,6 @@ tasks.withType<Zip> {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate-Handling für Distribution
|
|
||||||
tasks.withType<Copy> {
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Sync> {
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
||||||
}
|
|
||||||
|
|
||||||
// Desktop Application Configuration
|
// Desktop Application Configuration
|
||||||
compose.desktop {
|
compose.desktop {
|
||||||
application {
|
application {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# This file is the SINGLE SOURCE OF TRUTH for all project dependencies.
|
# This file is the SINGLE SOURCE OF TRUTH for all project dependencies.
|
||||||
# Organized by Domain: Frontend (KMP) vs. Backend (Spring/JVM)
|
# Organized by Domain: Frontend (KMP) vs. Backend (Spring/JVM)
|
||||||
# Last updated: 2026-01-29
|
# Last updated: 2026-02-03
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
@ -35,6 +35,10 @@ koinCompose = "4.1.1"
|
||||||
sqldelight = "2.2.1"
|
sqldelight = "2.2.1"
|
||||||
sqlite = "2.6.2"
|
sqlite = "2.6.2"
|
||||||
|
|
||||||
|
# Web Tooling (NPM)
|
||||||
|
copyWebpackPlugin = "11.0.0"
|
||||||
|
sqliteWasm = "3.51.1-build2"
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# === BACKEND & INFRASTRUCTURE ===
|
# === BACKEND & INFRASTRUCTURE ===
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
@ -69,7 +73,7 @@ keycloakAdminClient = "26.0.7"
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
bignum = "0.3.10"
|
bignum = "0.3.10"
|
||||||
logback = "1.5.22"
|
logback = "1.5.25"
|
||||||
caffeine = "3.2.3"
|
caffeine = "3.2.3"
|
||||||
reactorKafka = "1.3.23"
|
reactorKafka = "1.3.23"
|
||||||
jackson = "3.0.3"
|
jackson = "3.0.3"
|
||||||
|
|
@ -81,7 +85,7 @@ kotlin-logging = "7.0.13"
|
||||||
junitJupiter = "5.11.3"
|
junitJupiter = "5.11.3"
|
||||||
junitPlatform = "1.11.3"
|
junitPlatform = "1.11.3"
|
||||||
mockk = "1.14.7"
|
mockk = "1.14.7"
|
||||||
assertj = "3.27.6"
|
assertj = "3.27.7"
|
||||||
testcontainers = "2.0.3"
|
testcontainers = "2.0.3"
|
||||||
testcontainersKeycloak = "4.0.1"
|
testcontainersKeycloak = "4.0.1"
|
||||||
testcontainersJunitJupiter = "1.21.4"
|
testcontainersJunitJupiter = "1.21.4"
|
||||||
|
|
@ -111,11 +115,6 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
|
||||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }
|
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }
|
||||||
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
|
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
|
||||||
|
|
||||||
# Web Specifics
|
|
||||||
#npm-sqljs = { module = "sql.js", version = "1.12.0" }
|
|
||||||
#npm-copy-webpack = { module = "copy-webpack-plugin", version = "12.0.0" }
|
|
||||||
|
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# === FRONTEND: COMPOSE UI ===
|
# === FRONTEND: COMPOSE UI ===
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,3 @@ dependencies {
|
||||||
implementation(project(":frontend:core:sync"))
|
implementation(project(":frontend:core:sync"))
|
||||||
implementation(project(":frontend:shells:meldestelle-portal"))
|
implementation(project(":frontend:shells:meldestelle-portal"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test>().configureEach {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -16,40 +16,37 @@ dependencies {
|
||||||
// Importiert andere wichtige BOMs. Die Versionen werden durch diese
|
// Importiert andere wichtige BOMs. Die Versionen werden durch diese
|
||||||
// importierten Plattformen transitiv verwaltet.
|
// importierten Plattformen transitiv verwaltet.
|
||||||
api(platform(libs.spring.boot.dependencies))
|
api(platform(libs.spring.boot.dependencies))
|
||||||
api(platform(libs.spring.cloud.dependencies)) // NEU: Spring Cloud BOM hinzugefügt
|
api(platform(libs.spring.cloud.dependencies))
|
||||||
api(platform(libs.kotlin.bom))
|
api(platform(libs.kotlin.bom))
|
||||||
api(platform(libs.kotlinx.coroutines.bom))
|
api(platform(libs.kotlinx.coroutines.bom))
|
||||||
|
|
||||||
// `constraints` erzwingt spezifische Versionen für einzelne Bibliotheken.
|
// `constraints` erzwingt spezifische Versionen für einzelne Bibliotheken.
|
||||||
// Alle Versionen werden sicher aus `libs.versions.toml` bezogen.
|
// Alle Versionen werden sicher aus `libs.versions.toml` bezogen.
|
||||||
constraints {
|
constraints {
|
||||||
// --- Spring Boot Core Constraints wurden entfernt. ---
|
|
||||||
// Die Versionen werden jetzt vollständig durch das importierte Spring Boot BOM verwaltet.
|
|
||||||
// Das ist der saubere und empfohlene Weg.
|
|
||||||
|
|
||||||
// --- Utilities & Other ---
|
// --- Utilities & Other ---
|
||||||
api(libs.caffeine)
|
api(libs.caffeine)
|
||||||
api(libs.reactor.kafka)
|
api(libs.reactor.kafka)
|
||||||
api(libs.redisson)
|
api(libs.redisson)
|
||||||
// Removed the legacy UUID library constraint (com.benasher44:uuid) since project uses Kotlin stdlib UUID
|
|
||||||
api(libs.bignum)
|
api(libs.bignum)
|
||||||
// api(libs.consul.client) wird getauscht mir spring-cloud-starter-consul-discovery
|
|
||||||
api(libs.spring.cloud.starter.consul.discovery)
|
api(libs.spring.cloud.starter.consul.discovery)
|
||||||
api(libs.kotlin.logging.jvm)
|
api(libs.kotlin.logging.jvm)
|
||||||
api(libs.jakarta.annotation.api)
|
api(libs.jakarta.annotation.api)
|
||||||
api(libs.auth0.java.jwt)
|
api(libs.auth0.java.jwt)
|
||||||
|
|
||||||
|
// Logging: WICHTIG! Core und Classic müssen synchronisiert sein.
|
||||||
api(libs.logback.classic)
|
api(libs.logback.classic)
|
||||||
|
api(libs.logback.core)
|
||||||
|
|
||||||
// --- Spring & SpringDoc ---
|
// --- Spring & SpringDoc ---
|
||||||
api(libs.springdoc.openapi.starter.common)
|
api(libs.springdoc.openapi.starter.common)
|
||||||
// KORREKTUR: `webmvc`-Starter durch `webflux`-Starter ersetzt, um Konflikt zu beheben.
|
|
||||||
api(libs.springdoc.openapi.starter.webflux.ui)
|
api(libs.springdoc.openapi.starter.webflux.ui)
|
||||||
|
|
||||||
// --- Database & Persistence ---
|
// --- Database & Persistence ---
|
||||||
// Exposed Bundle wieder aktiviert, da Version jetzt kompatibel ist
|
|
||||||
api(libs.exposed.core)
|
api(libs.exposed.core)
|
||||||
api(libs.exposed.dao)
|
api(libs.exposed.dao)
|
||||||
api(libs.exposed.jdbc)
|
api(libs.exposed.jdbc)
|
||||||
api(libs.exposed.kotlin.datetime)
|
api(libs.exposed.kotlin.datetime)
|
||||||
|
|
||||||
// Flyway Bundle kann nicht direkt in constraints verwendet werden, müssen einzeln gelistet werden
|
|
||||||
api(libs.flyway.core)
|
api(libs.flyway.core)
|
||||||
api(libs.flyway.postgresql)
|
api(libs.flyway.postgresql)
|
||||||
|
|
||||||
|
|
@ -57,16 +54,19 @@ dependencies {
|
||||||
api(libs.hikari.cp)
|
api(libs.hikari.cp)
|
||||||
api(libs.h2.driver)
|
api(libs.h2.driver)
|
||||||
api(libs.lettuce.core)
|
api(libs.lettuce.core)
|
||||||
|
|
||||||
// --- Kotlinx Libraries ---
|
// --- Kotlinx Libraries ---
|
||||||
api(libs.kotlinx.serialization.json)
|
api(libs.kotlinx.serialization.json)
|
||||||
api(libs.kotlinx.datetime)
|
api(libs.kotlinx.datetime)
|
||||||
|
|
||||||
// --- Jackson Modules ---
|
// --- Jackson Modules ---
|
||||||
api(libs.jackson.module.kotlin)
|
api(libs.jackson.module.kotlin)
|
||||||
api(libs.jackson.datatype.jsr310)
|
api(libs.jackson.datatype.jsr310)
|
||||||
// --- Ktor OpenAPI (runtime-based docs require explicit routing-openapi in 3.4.0) ---
|
|
||||||
|
// --- Ktor OpenAPI ---
|
||||||
api("io.ktor:ktor-server-routing-openapi:${libs.versions.ktor.get()}")
|
api("io.ktor:ktor-server-routing-openapi:${libs.versions.ktor.get()}")
|
||||||
|
|
||||||
// --- Testcontainers ---
|
// --- Testcontainers ---
|
||||||
// Testcontainers Bundle kann nicht direkt in constraints verwendet werden
|
|
||||||
api(libs.testcontainers.core)
|
api(libs.testcontainers.core)
|
||||||
api(libs.testcontainers.junit.jupiter)
|
api(libs.testcontainers.junit.jupiter)
|
||||||
api(libs.testcontainers.postgresql)
|
api(libs.testcontainers.postgresql)
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ plugins {
|
||||||
dependencies {
|
dependencies {
|
||||||
// Importiert die zentrale BOM für konsistente Versionen.
|
// Importiert die zentrale BOM für konsistente Versionen.
|
||||||
api(platform(projects.platform.platformBom))
|
api(platform(projects.platform.platformBom))
|
||||||
// Diese Bundles sind in `libs.versions.toml` definiert.
|
|
||||||
// api(libs.bundles.testing.jvm)
|
// Testing Libraries
|
||||||
api(libs.junit.jupiter.api)
|
api(libs.junit.jupiter.api)
|
||||||
api(libs.junit.jupiter.engine)
|
api(libs.junit.jupiter.engine)
|
||||||
api(libs.junit.jupiter.params)
|
api(libs.junit.jupiter.params)
|
||||||
|
|
@ -17,22 +17,18 @@ dependencies {
|
||||||
api(libs.assertj.core)
|
api(libs.assertj.core)
|
||||||
api(libs.kotlinx.coroutines.test)
|
api(libs.kotlinx.coroutines.test)
|
||||||
|
|
||||||
// api(libs.bundles.testcontainers)
|
// Logging für Tests (wichtig, um NoClassDefFoundError bei Logback zu vermeiden)
|
||||||
|
api(libs.logback.classic)
|
||||||
|
|
||||||
|
// Testcontainers
|
||||||
api(libs.testcontainers.core)
|
api(libs.testcontainers.core)
|
||||||
api(libs.testcontainers.junit.jupiter)
|
api(libs.testcontainers.junit.jupiter)
|
||||||
api(libs.testcontainers.postgresql)
|
api(libs.testcontainers.postgresql)
|
||||||
api(libs.testcontainers.keycloak)
|
api(libs.testcontainers.keycloak)
|
||||||
|
|
||||||
// Macht Kafka- und Reactor-Test-Bibliotheken verfügbar
|
|
||||||
api(libs.testcontainers.kafka)
|
api(libs.testcontainers.kafka)
|
||||||
|
|
||||||
|
// Reactor & Spring Testing
|
||||||
api(libs.reactor.test)
|
api(libs.reactor.test)
|
||||||
// Stellt Spring Boot Test-Abhängigkeiten und die H2-Datenbank für Tests bereit.
|
|
||||||
api(libs.spring.boot.starter.test)
|
api(libs.spring.boot.starter.test)
|
||||||
api(libs.h2.driver)
|
api(libs.h2.driver)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test> {
|
|
||||||
useJUnitPlatform()
|
|
||||||
// Removed parallel execution and byte-buddy agent configuration to prevent conflicts
|
|
||||||
// with global test configuration in root build.gradle.kts
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -5,23 +5,16 @@ pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google() // Removed content filtering to ensure all artifacts are found
|
google()
|
||||||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||||||
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public")
|
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public")
|
||||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") } // Added snapshots for plugins
|
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||||
}
|
|
||||||
plugins {
|
|
||||||
// Centralized Plugin Version Management
|
|
||||||
// This allows subprojects to apply plugins without versions, avoiding conflicts.
|
|
||||||
id("org.jetbrains.kotlin.multiplatform") version "2.3.0"
|
|
||||||
id("org.jetbrains.kotlin.plugin.serialization") version "2.3.0"
|
|
||||||
id("org.jetbrains.compose") version "1.10.0"
|
|
||||||
id("org.jetbrains.kotlin.plugin.compose") version "2.3.0"
|
|
||||||
id("app.cash.sqldelight") version "2.2.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
// Settings plugins cannot easily use version catalogs because the catalog is loaded
|
||||||
|
// as part of the settings evaluation. We must hardcode the version here.
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +88,7 @@ include(":docs")
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// --- CORE ---
|
// --- CORE ---
|
||||||
// frontend/core/auth
|
// frontend/core/auth
|
||||||
include(":frontend:core:auth") // MOVED from features
|
include(":frontend:core:auth")
|
||||||
include(":frontend:core:domain")
|
include(":frontend:core:domain")
|
||||||
include(":frontend:core:design-system")
|
include(":frontend:core:design-system")
|
||||||
include(":frontend:core:navigation")
|
include(":frontend:core:navigation")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user