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:
@@ -1,8 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
@@ -13,11 +10,9 @@ version = "1.0.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
|
||||
js {
|
||||
binaries.library()
|
||||
// CHANGED: Use nodejs() instead of browser() to minimize NodeJsRootPlugin conflicts in Docker
|
||||
// while still satisfying the "configured for JS usage" requirement.
|
||||
// Use nodejs() to minimize NodeJsRootPlugin conflicts in Docker
|
||||
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 {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
js {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -25,9 +19,7 @@ kotlin {
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.bundles.kmp.common)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
@@ -14,9 +13,9 @@ kotlin {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +26,4 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_25)
|
||||
freeCompilerArgs.addAll("-opt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
}
|
||||
// KMP Compile-Optionen sind jetzt zentral in der Root build.gradle.kts definiert
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
|
||||
plugins {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
alias(libs.plugins.sqldelight)
|
||||
}
|
||||
@@ -13,12 +12,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -35,7 +29,7 @@ kotlin {
|
||||
|
||||
jsMain.dependencies {
|
||||
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 {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Dieses Modul definiert nur die Navigationsrouten.
|
||||
* Es ist noch simpler.
|
||||
*/
|
||||
plugins {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
}
|
||||
|
||||
group = "at.mocode.clients.shared"
|
||||
@@ -14,18 +12,13 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
// Depend on core domain for User/Role types used by navigation API
|
||||
implementation(project(":frontend:core:domain"))
|
||||
implementation(projects.frontend.core.domain)
|
||||
}
|
||||
commonTest.dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
}
|
||||
|
||||
@@ -13,12 +11,7 @@ kotlin {
|
||||
jvm()
|
||||
js {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
|
||||
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 {
|
||||
// Fix for "Plugin loaded multiple times": Apply plugin by ID without version (inherited from root)
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
js {
|
||||
binaries.library()
|
||||
// Re-enabled browser environment after Root NodeJs fix
|
||||
browser {
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
Reference in New Issue
Block a user