* Gradle Git Versioning Plugin * Changelog * Flatpack build workflow
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Deb
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat.Msi
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.kover)
|
||||
@@ -29,18 +31,31 @@ compose.desktop {
|
||||
mainClass = "ch.dissem.yaep.ui.desktop.MainKt"
|
||||
|
||||
nativeDistributions {
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||
val formats = mutableListOf(Deb)
|
||||
packageName = "YAEP"
|
||||
packageVersion = libs.versions.app.version.name.get()
|
||||
macOS {
|
||||
iconFile.set(project.file("icon.icns"))
|
||||
val baseVersion = version.toString()
|
||||
packageVersion = baseVersion
|
||||
if (baseVersion.matches(Regex("[1-9][0-9]*(\\.[0-9]+)(\\.[0-9]+)"))) {
|
||||
formats.add(Dmg)
|
||||
macOS {
|
||||
iconFile.set(project.file("icon.icns"))
|
||||
}
|
||||
}
|
||||
windows {
|
||||
iconFile.set(project.file("icon.ico"))
|
||||
if (baseVersion.matches(Regex("[1-2]?[0-9]?[0-9]\\.[1-2]?[0-9]?[0-9]\\.[1-6]?[0-9]?[0-9]?[0-9]?[0-9]"))) {
|
||||
windows {
|
||||
formats.add(Msi)
|
||||
iconFile.set(project.file("icon.ico"))
|
||||
}
|
||||
}
|
||||
linux {
|
||||
debPackageVersion = if (baseVersion.first().isDigit()) {
|
||||
baseVersion
|
||||
} else {
|
||||
"0-$baseVersion"
|
||||
}
|
||||
iconFile.set(project.file("icon.png"))
|
||||
}
|
||||
targetFormats(*formats.toTypedArray())
|
||||
|
||||
buildTypes.release.proguard {
|
||||
configurationFiles.from(project.file("proguard-rules.pro"))
|
||||
|
||||
Reference in New Issue
Block a user