feat(devops): configure desktop packaging and introduce semantic versioning
- Added `nativeDistributions` for Linux (.deb), Windows (.msi), and macOS (.dmg) in `build.gradle.kts` with platform-specific settings, embedded JRE, and JVM-args. - Implemented centralized semantic versioning via `version.properties` as the single source of truth, applying it across all builds. - Introduced CI/CD release workflow (`.gitea/workflows/release.yml`) for auto-tagging, artifact builds, and release summaries. - Created `CHANGELOG.md` following Keep-a-Changelog format for tracking changes. - Documented icon requirements and packaging steps in `ICONS_PLACEHOLDER.md`. - Updated DevOps roadmap to reflect completed Sprint C-1 and C-2 tasks. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
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)
|
||||
@@ -13,6 +24,18 @@ plugins {
|
||||
id("org.jetbrains.compose.hot-reload")
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Version aus root version.properties lesen (SemVer)
|
||||
// ---------------------------------------------------------------
|
||||
val versionProps = Properties().also { props ->
|
||||
rootProject.file("version.properties").inputStream().use { props.load(it) }
|
||||
}
|
||||
val vMajor = versionProps.getProperty("VERSION_MAJOR", "1")
|
||||
val vMinor = versionProps.getProperty("VERSION_MINOR", "0")
|
||||
val vPatch = versionProps.getProperty("VERSION_PATCH", "0")
|
||||
// nativeDistributions erwartet reines "MAJOR.MINOR.PATCH" (kein Qualifier)
|
||||
val packageVer = "$vMajor.$vMinor.$vPatch"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
|
||||
@@ -69,23 +92,88 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compose.desktop {
|
||||
application {
|
||||
mainClass = "at.mocode.desktop.MainKt"
|
||||
|
||||
nativeDistributions {
|
||||
// Ziel-Formate: Linux .deb, Windows .msi, macOS .dmg
|
||||
targetFormats(TargetFormat.Deb, TargetFormat.Msi, TargetFormat.Dmg)
|
||||
packageName = "Meldestelle"
|
||||
packageVersion = "1.0.0"
|
||||
|
||||
// -------------------------------------------------------
|
||||
// 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"))
|
||||
}
|
||||
windows {
|
||||
packageName = "meldestelle"
|
||||
// Debian-Kategorie
|
||||
appCategory = "misc"
|
||||
// Menü-Eintrag
|
||||
menuGroup = "Meldestelle"
|
||||
upgradeUuid = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
||||
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",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# App-Icons — Platzhalter
|
||||
|
||||
Folgende Icon-Dateien müssen hier abgelegt werden, bevor ein Release-Build erstellt wird:
|
||||
|
||||
| Datei | Format | Größe | Plattform |
|
||||
|-------------|--------|--------------|----------------|
|
||||
| `icon.png` | PNG | 512×512 px | Linux (.deb) |
|
||||
| `icon.ico` | ICO | 256×256 px | Windows (.msi) |
|
||||
| `icon.icns` | ICNS | 1024×1024 px | macOS (.dmg) |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- PNG: RGBA, transparenter Hintergrund empfohlen
|
||||
- ICO: Multi-Size (16, 32, 48, 64, 128, 256 px) in einer Datei
|
||||
- ICNS: Mit `iconutil` (macOS) oder `png2icns` (Linux) aus PNG erzeugen
|
||||
|
||||
## Schnell-Erzeugung (Linux, ImageMagick)
|
||||
|
||||
```bash
|
||||
# PNG → ICO (Windows)
|
||||
convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico
|
||||
|
||||
# PNG → ICNS (macOS, benötigt libicns)
|
||||
png2icns icon.icns icon.png
|
||||
```
|
||||
Reference in New Issue
Block a user