Skip to content

Commit f86b5c1

Browse files
committed
App: Set macOS application icon
This commit updates the `composeApp/build.gradle.kts` to specify an icon for the macOS application build. - The `packageName` for native distributions has been changed from "id.neotica.modernadb" to "ModernADB". - A new `macOS` configuration block is added to set the `iconFile` to `ModernADB.icns`, which is expected to be generated by moko-resources. - The `ModernADB.icns` icon file has been added to `composeApp/src/desktopMain/moko-resources/files/`.
1 parent f52f51c commit f86b5c1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

composeApp/build.gradle.kts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ plugins {
1010

1111
kotlin {
1212
jvm("desktop")
13-
13+
1414
sourceSets {
1515
val desktopMain by getting
16-
16+
1717
commonMain.dependencies {
1818
implementation(compose.runtime)
1919
implementation(compose.foundation)
@@ -46,9 +46,14 @@ compose.desktop {
4646

4747
nativeDistributions {
4848
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Rpm)
49-
packageName = "id.neotica.modernadb"
49+
packageName = "ModernADB"
5050
packageVersion = "1.0.0"
5151

52+
macOS {
53+
val generatedIcon = layout.buildDirectory.file("generated/moko-resources/desktopMain/res/files/ModernADB.icns")
54+
iconFile.set(generatedIcon)
55+
}
56+
5257
project.file("src/desktopMain/composeResources/platform-tools").resolve(
5358
when {
5459
System.getProperty("os.name").startsWith("Windows") -> "windows"
116 KB
Binary file not shown.

0 commit comments

Comments
 (0)