Some checks failed
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Has been cancelled
Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
183 lines
6.8 KiB
Plaintext
183 lines
6.8 KiB
Plaintext
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||
import java.util.*
|
||
|
||
/**
|
||
* Shell-Modul: Meldestelle Desktop App
|
||
* Reines JVM/Compose-Desktop-Modul – Desktop-First gemäß MASTER_ROADMAP.
|
||
* Setzt alle Core- und Feature-Module zu einer lauffähigen Desktop-Anwendung zusammen.
|
||
*
|
||
* Packaging:
|
||
* ./gradlew :frontend:shells:meldestelle-desktop:packageDeb → Linux .deb
|
||
* ./gradlew :frontend:shells:meldestelle-desktop:packageMsi → Windows .msi
|
||
* ./gradlew :frontend:shells:meldestelle-desktop:packageDmg → macOS .dmg
|
||
* ./gradlew :frontend:shells:meldestelle-desktop:packageReleaseDistributables → alle Plattformen
|
||
*
|
||
* Version: Wird automatisch aus version.properties im Root-Projekt gelesen (SemVer).
|
||
* Icons: src/jvmMain/resources/icon.png / icon.ico / icon.icns
|
||
* → siehe ICONS_PLACEHOLDER.md für Anforderungen
|
||
*/
|
||
plugins {
|
||
alias(libs.plugins.kotlinMultiplatform)
|
||
alias(libs.plugins.composeCompiler)
|
||
alias(libs.plugins.composeMultiplatform)
|
||
alias(libs.plugins.kotlinSerialization)
|
||
}
|
||
|
||
// ---------------------------------------------------------------
|
||
// Version aus root version.properties lesen (SemVer)
|
||
// ---------------------------------------------------------------
|
||
val versionProps = Properties().also { props ->
|
||
rootProject.file("version.properties").inputStream().use { props.load(it) }
|
||
}
|
||
val vMajor: String? = versionProps.getProperty("VERSION_MAJOR", "1")
|
||
val vMinor: String? = versionProps.getProperty("VERSION_MINOR", "0")
|
||
val vPatch: String? = versionProps.getProperty("VERSION_PATCH", "0")
|
||
// nativeDistributions erwartet reines "MAJOR.MINOR.PATCH" (kein Qualifier)
|
||
val packageVer = "$vMajor.$vMinor.$vPatch"
|
||
|
||
kotlin {
|
||
jvm()
|
||
|
||
sourceSets {
|
||
jvmMain.dependencies {
|
||
// Core-Module
|
||
implementation(projects.frontend.core.domain)
|
||
implementation(projects.frontend.core.designSystem)
|
||
implementation(projects.frontend.core.navigation)
|
||
implementation(projects.frontend.core.network)
|
||
implementation(projects.frontend.core.sync)
|
||
implementation(projects.frontend.core.localDb)
|
||
implementation(projects.frontend.core.auth)
|
||
implementation(projects.core.znsParser)
|
||
|
||
// Feature-Module
|
||
implementation(projects.frontend.features.pingFeature)
|
||
implementation(projects.frontend.features.nennungFeature)
|
||
|
||
implementation(projects.frontend.features.znsImportFeature)
|
||
implementation(projects.frontend.features.veranstalterFeature)
|
||
implementation(projects.frontend.features.veranstaltungFeature)
|
||
implementation(projects.frontend.features.funktionaerFeature)
|
||
implementation(projects.frontend.features.profileFeature)
|
||
implementation(projects.frontend.features.reiterFeature)
|
||
implementation(projects.frontend.features.pferdeFeature)
|
||
implementation(projects.frontend.features.vereinFeature)
|
||
implementation(projects.frontend.features.turnierFeature)
|
||
implementation(projects.frontend.features.billingFeature)
|
||
implementation(projects.frontend.features.deviceInitialization)
|
||
|
||
// Compose Desktop
|
||
implementation(compose.desktop.currentOs)
|
||
implementation(compose.runtime)
|
||
implementation(compose.foundation)
|
||
implementation(compose.material3)
|
||
implementation(compose.ui)
|
||
implementation(compose.materialIconsExtended)
|
||
implementation(compose.uiTooling)
|
||
implementation(libs.composeHotReloadApi)
|
||
|
||
// DI (Koin)
|
||
implementation(libs.koin.core)
|
||
implementation(libs.koin.compose)
|
||
implementation(libs.koin.compose.viewmodel)
|
||
|
||
// Coroutines
|
||
implementation(libs.kotlinx.coroutines.swing)
|
||
|
||
// Bundles
|
||
implementation(libs.bundles.kmp.common)
|
||
implementation(libs.bundles.compose.common)
|
||
}
|
||
|
||
jvmTest.dependencies {
|
||
implementation(libs.kotlin.test)
|
||
}
|
||
}
|
||
}
|
||
|
||
compose.desktop {
|
||
application {
|
||
mainClass = "at.mocode.desktop.MainKt"
|
||
|
||
nativeDistributions {
|
||
// Ziel-Formate: Linux .deb, Windows .msi, macOS .dmg
|
||
targetFormats(TargetFormat.Deb, TargetFormat.Msi, TargetFormat.Dmg)
|
||
|
||
// -------------------------------------------------------
|
||
// Gemeinsame App-Metadaten
|
||
// -------------------------------------------------------
|
||
packageName = "meldestelle"
|
||
packageVersion = packageVer
|
||
description = "ÖTO-konforme Turnier-Meldestelle – Desktop App"
|
||
vendor = "mo-code.at"
|
||
copyright = "© 2024–2026 mo-code.at. Alle Rechte vorbehalten."
|
||
licenseFile.set(rootProject.file("LICENSE"))
|
||
|
||
// -------------------------------------------------------
|
||
// Linux (.deb)
|
||
// -------------------------------------------------------
|
||
linux {
|
||
// PNG 512×512 px — siehe src/jvmMain/resources/ICONS_PLACEHOLDER.md
|
||
iconFile.set(project.file("src/jvmMain/resources/icon.png"))
|
||
packageName = "meldestelle"
|
||
// Debian-Kategorie
|
||
appCategory = "misc"
|
||
// Menü-Eintrag
|
||
menuGroup = "Meldestelle"
|
||
shortcut = true
|
||
debMaintainer = "support@mo-code.at"
|
||
}
|
||
|
||
// -------------------------------------------------------
|
||
// Windows (.msi)
|
||
// -------------------------------------------------------
|
||
windows {
|
||
// ICO Multi-Size — siehe src/jvmMain/resources/ICONS_PLACEHOLDER.md
|
||
iconFile.set(project.file("src/jvmMain/resources/icon.ico"))
|
||
// Eindeutige GUID für Windows Installer Upgrade-Erkennung
|
||
// WICHTIG: Diese UUID darf sich NIE ändern!
|
||
upgradeUuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
||
menuGroup = "Meldestelle"
|
||
// Startmenü-Verknüpfung
|
||
shortcut = true
|
||
// Desktop-Verknüpfung
|
||
dirChooser = true
|
||
perUserInstall = false
|
||
}
|
||
|
||
// -------------------------------------------------------
|
||
// macOS (.dmg)
|
||
// -------------------------------------------------------
|
||
macOS {
|
||
// ICNS 1024×1024 px — siehe src/jvmMain/resources/ICONS_PLACEHOLDER.md
|
||
iconFile.set(project.file("src/jvmMain/resources/icon.icns"))
|
||
bundleID = "at.mocode.meldestelle"
|
||
appCategory = "public.app-category.productivity"
|
||
// Für notarisierten Release: signing-Konfiguration hier ergänzen
|
||
// signing { sign.set(true); identity.set("Developer ID Application: ...") }
|
||
}
|
||
|
||
// -------------------------------------------------------
|
||
// JVM-Laufzeit-Konfiguration (eingebettetes JRE)
|
||
// -------------------------------------------------------
|
||
modules(
|
||
"java.base",
|
||
"java.desktop",
|
||
"java.logging",
|
||
"java.naming",
|
||
"java.net.http",
|
||
"java.sql",
|
||
"jdk.crypto.ec",
|
||
"jdk.unsupported",
|
||
)
|
||
}
|
||
|
||
// JVM-Argumente für die gepackte Anwendung
|
||
jvmArgs(
|
||
"-Xms128m",
|
||
"-Xmx512m",
|
||
"-Dfile.encoding=UTF-8",
|
||
)
|
||
}
|
||
}
|