fix(gradle) gradle.build
This commit is contained in:
@@ -1,52 +1,64 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("org.springframework.boot") apply false
|
||||
id("io.spring.dependency-management") apply false
|
||||
id("org.jetbrains.compose") version "1.7.3"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.20"
|
||||
// KORREKTUR: Wir deklarieren dieses Modul als Kotlin Multiplatform Modul.
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
// KORREKTUR: Wir deklarieren, dass wir Jetpack Compose verwenden.
|
||||
alias(libs.plugins.compose.multiplatform)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Core dependencies
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
|
||||
// Domain modules
|
||||
implementation(projects.events.eventsDomain)
|
||||
implementation(projects.horses.horsesDomain)
|
||||
implementation(projects.masterdata.masterdataDomain)
|
||||
implementation(projects.members.membersDomain)
|
||||
|
||||
// Compose dependencies for Desktop
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
// AndroidX dependencies are provided by the Compose plugin
|
||||
|
||||
// Ktor Client dependencies
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.cio)
|
||||
implementation(libs.ktor.client.contentNegotiation)
|
||||
implementation(libs.ktor.client.serializationKotlinxJson)
|
||||
|
||||
// Kotlinx dependencies
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.0")
|
||||
implementation("com.benasher44:uuid:0.8.4")
|
||||
|
||||
// Testing
|
||||
testImplementation(kotlin("test"))
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
|
||||
kotlin {
|
||||
// Wir definieren die Zielplattformen, für die dieses Modul Code bereitstellt.
|
||||
jvm("desktop") // Ein JVM-Target für unsere Desktop-App
|
||||
js(IR) { // Ein JavaScript-Target für unsere Web-App
|
||||
browser()
|
||||
binaries.executable()
|
||||
}
|
||||
|
||||
// Hier definieren wir die Abhängigkeiten für die jeweiligen Source Sets.
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
// --- Interne Module (für alle Plattformen verfügbar) ---
|
||||
api(projects.core.coreDomain)
|
||||
api(projects.core.coreUtils)
|
||||
|
||||
// --- Jetpack Compose UI (für alle Plattformen verfügbar) ---
|
||||
api(compose.runtime)
|
||||
api(compose.foundation)
|
||||
api(compose.material3)
|
||||
api(compose.ui)
|
||||
api(compose.components.resources)
|
||||
api(compose.materialIconsExtended)
|
||||
|
||||
// --- Ktor Client für API-Kommunikation (Kernmodul für alle) ---
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.contentNegotiation)
|
||||
implementation(libs.ktor.client.serialization.kotlinx.json)
|
||||
|
||||
// --- Coroutines (für alle Plattformen verfügbar) ---
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
}
|
||||
}
|
||||
|
||||
val desktopMain by getting {
|
||||
dependencies {
|
||||
// Ktor-Engine, die nur für die Desktop (JVM) Version benötigt wird
|
||||
implementation(libs.ktor.client.cio)
|
||||
}
|
||||
}
|
||||
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
// Ktor-Engine, die nur für die Web (JS) Version benötigt wird
|
||||
implementation(libs.ktor.client.js)
|
||||
}
|
||||
}
|
||||
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
implementation(libs.kotlinx.coroutines.test)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +1,25 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
kotlin("plugin.spring")
|
||||
id("org.springframework.boot")
|
||||
id("io.spring.dependency-management") version "1.1.4"
|
||||
id("org.jetbrains.compose") version "1.7.3"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.21"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
alias(libs.plugins.compose.multiplatform)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Greift explizit auf den "desktop" (JVM) Teil unseres KMP-Moduls zu.
|
||||
implementation(projects.client.commonUi)
|
||||
implementation(projects.client.webApp)
|
||||
implementation(projects.infrastructure.auth.authClient)
|
||||
implementation(projects.infrastructure.cache.redisCache)
|
||||
implementation(projects.infrastructure.eventStore.redisEventStore)
|
||||
|
||||
// Domain modules
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
implementation(projects.events.eventsDomain)
|
||||
implementation(projects.horses.horsesDomain)
|
||||
implementation(projects.masterdata.masterdataDomain)
|
||||
|
||||
// Spring Boot dependencies
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
|
||||
// Redis dependencies
|
||||
implementation("org.redisson:redisson:3.27.2")
|
||||
implementation("io.lettuce:lettuce-core:6.3.2.RELEASE")
|
||||
|
||||
// Kotlinx dependencies
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
||||
implementation("com.benasher44:uuid:0.8.4")
|
||||
|
||||
// Compose dependencies
|
||||
// Stellt die Desktop-spezifischen Teile von Jetpack Compose bereit.
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
// Stellt die Coroutine-Integration für die Swing-UI-Bibliothek bereit.
|
||||
implementation(libs.kotlinx.coroutines.swing)
|
||||
|
||||
// --- Testing ---
|
||||
testImplementation(projects.platform.platformTesting)
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
application {
|
||||
mainClass = "at.mocode.client.desktop.MainKt"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose") version "1.7.3"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.21"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Client dependencies - only what's needed for desktop app
|
||||
implementation(projects.client.commonUi)
|
||||
implementation(projects.client.webApp) // Only if truly needed for shared screens
|
||||
|
||||
// Core dependencies - minimal set
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
|
||||
// Remove unnecessary infrastructure dependencies
|
||||
// implementation(projects.infrastructure.auth.authClient) // Only if auth is needed
|
||||
// implementation(projects.infrastructure.cache.redisCache) // Not needed in client
|
||||
// implementation(projects.infrastructure.eventStore.redisEventStore) // Not needed in client
|
||||
|
||||
// Remove domain module dependencies - should go through API
|
||||
// implementation(projects.events.eventsDomain) // Access through API instead
|
||||
// implementation(projects.horses.horsesDomain) // Access through API instead
|
||||
// implementation(projects.masterdata.masterdataDomain) // Access through API instead
|
||||
|
||||
// Remove Spring Boot dependencies - not needed for desktop client
|
||||
// implementation("org.springframework.boot:spring-boot-starter")
|
||||
|
||||
// Remove Redis dependencies - not needed for desktop client
|
||||
// implementation("org.redisson:redisson:3.27.2")
|
||||
// implementation("io.lettuce:lettuce-core:6.3.2.RELEASE")
|
||||
|
||||
// Keep only essential Kotlinx dependencies
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.0") // Changed from javafx to swing
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
||||
implementation("com.benasher44:uuid:0.8.4")
|
||||
|
||||
// Compose dependencies - keep as needed for desktop UI
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
// Testing
|
||||
testImplementation(projects.platform.platformTesting)
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
|
||||
}
|
||||
|
||||
// Desktop application configuration
|
||||
compose.desktop {
|
||||
application {
|
||||
mainClass = "at.mocode.client.desktop.MainKt"
|
||||
|
||||
nativeDistributions {
|
||||
targetFormats(
|
||||
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg,
|
||||
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Msi,
|
||||
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Deb
|
||||
)
|
||||
packageName = "Meldestelle Desktop"
|
||||
packageVersion = "1.0.0"
|
||||
description = "Meldestelle Desktop Application"
|
||||
copyright = "© 2024 MoCode. All rights reserved."
|
||||
vendor = "MoCode"
|
||||
|
||||
windows {
|
||||
iconFile.set(project.file("src/main/resources/icon.ico"))
|
||||
}
|
||||
macOS {
|
||||
iconFile.set(project.file("src/main/resources/icon.icns"))
|
||||
}
|
||||
linux {
|
||||
iconFile.set(project.file("src/main/resources/icon.png"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +1,34 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
kotlin("plugin.spring")
|
||||
id("org.springframework.boot")
|
||||
id("io.spring.dependency-management") version "1.1.4"
|
||||
id("org.jetbrains.compose") version "1.7.3"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.21"
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.compose.multiplatform)
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Client dependencies
|
||||
implementation(projects.client.commonUi)
|
||||
|
||||
// Core dependencies - minimal set
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
|
||||
// Remove unnecessary infrastructure dependencies
|
||||
// implementation(projects.infrastructure.auth.authClient) // Only if auth is needed
|
||||
|
||||
// Remove direct domain module dependencies - access through API instead
|
||||
// implementation(projects.members.membersDomain) // Access through API
|
||||
// implementation(projects.members.membersApplication) // Access through API
|
||||
// implementation(projects.masterdata.masterdataDomain) // Access through API
|
||||
// implementation(projects.horses.horsesDomain) // Access through API
|
||||
// implementation(projects.events.eventsDomain) // Access through API
|
||||
|
||||
// Compose dependencies for Desktop
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
// Essential Kotlinx dependencies
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.0")
|
||||
implementation("com.benasher44:uuid:0.8.4")
|
||||
|
||||
// Testing
|
||||
testImplementation(projects.platform.platformTesting)
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
|
||||
testImplementation("io.mockk:mockk:1.13.8")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
|
||||
kotlin {
|
||||
js(IR) {
|
||||
browser {
|
||||
// Konfiguriert den Development-Server und die finalen Bundles.
|
||||
commonWebpackConfig {
|
||||
outputFileName = "MeldestelleWebApp.js"
|
||||
}
|
||||
}
|
||||
binaries.executable()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
// Greift explizit auf den JS-Teil unseres KMP-Moduls zu.
|
||||
implementation(projects.client.commonUi)
|
||||
|
||||
// Stellt die Web-spezifischen (HTML) Teile von Jetpack Compose bereit.
|
||||
implementation(compose.html.core)
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.compose") version "1.7.3"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.21"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Client dependencies
|
||||
implementation(projects.client.commonUi)
|
||||
|
||||
// Core dependencies - minimal set
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
|
||||
// Remove unnecessary infrastructure dependencies
|
||||
// implementation(projects.infrastructure.auth.authClient) // Only if auth is needed
|
||||
|
||||
// Remove direct domain module dependencies - access through API instead
|
||||
// implementation(projects.members.membersDomain) // Access through API
|
||||
// implementation(projects.members.membersApplication) // Access through API
|
||||
// implementation(projects.masterdata.masterdataDomain) // Access through API
|
||||
// implementation(projects.horses.horsesDomain) // Access through API
|
||||
// implementation(projects.events.eventsDomain) // Access through API
|
||||
|
||||
// Compose dependencies for Web (using Compose Multiplatform for Web)
|
||||
implementation(compose.html.core)
|
||||
implementation(compose.runtime)
|
||||
|
||||
// Alternative: If using Compose for Desktop in web context
|
||||
// implementation(compose.desktop.currentOs)
|
||||
// implementation(compose.foundation)
|
||||
// implementation(compose.material3)
|
||||
// implementation(compose.ui)
|
||||
// implementation(compose.components.resources)
|
||||
// implementation(compose.materialIconsExtended)
|
||||
|
||||
// Essential Kotlinx dependencies
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-js:1.8.0") // For web target
|
||||
implementation("com.benasher44:uuid:0.8.4")
|
||||
|
||||
// Testing
|
||||
testImplementation(projects.platform.platformTesting)
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
|
||||
testImplementation("io.mockk:mockk:1.13.8")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
|
||||
}
|
||||
|
||||
// Web application configuration
|
||||
compose.experimental {
|
||||
web.application {}
|
||||
}
|
||||
Reference in New Issue
Block a user