Skip to content

Commit f834639

Browse files
add icons
1 parent 897a14e commit f834639

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

composeApp/build.gradle.kts

+20-10
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ java {
1414

1515
kotlin {
1616
jvm("desktop")
17-
17+
1818
sourceSets {
1919
val desktopMain by getting
20-
20+
2121
commonMain.dependencies {
2222
implementation(compose.runtime)
2323
implementation(compose.foundation)
@@ -38,30 +38,40 @@ kotlin {
3838

3939
implementation(libs.klogging)
4040
}
41-
// https://gist.github.com/OysterD3?page=3
42-
// https://betterprogramming.pub/how-to-create-an-auto-updater-for-desktop-application-jetpack-compose-d118db26d65f
4341
desktopMain.dependencies {
44-
implementation(compose.desktop.currentOs){
42+
implementation(compose.desktop.currentOs) {
4543
exclude("org.jetbrains.compose.material")
4644
}
4745
implementation(libs.kotlinx.coroutines.swing)
4846
}
4947
}
5048
}
5149

52-
5350
compose.desktop {
5451
application {
5552
mainClass = "fr.thomasbernard03.androidtools.MainKt"
5653

54+
buildTypes {
55+
release {
56+
proguard {
57+
configurationFiles.from("proguard-rules.pro") // Ajoute un fichier de règles personnalisé si nécessaire
58+
// ignoreWarnings.set(true) // Cette option permet d'ignorer les avertissements
59+
}
60+
}
61+
}
62+
5763
nativeDistributions {
58-
targetFormats(TargetFormat.Dmg, TargetFormat.Exe, TargetFormat.Deb)
59-
packageName = "fr.thomasbernard03.androidtools"
64+
targetFormats(TargetFormat.Pkg, TargetFormat.Exe, TargetFormat.Deb)
65+
packageName = "Android Tools"
6066
packageVersion = "1.0.0"
6167

68+
macOS {
69+
iconFile.set(project.file("src/commonMain/composeResources/drawable/icon.icns"))
70+
}
71+
6272
windows {
63-
iconFile.set(project.file("icon.ico"))
73+
iconFile.set(project.file("src/commonMain/composeResources/drawable/icon.ico"))
6474
}
6575
}
6676
}
67-
}
77+
}
Binary file not shown.

proguard-rules.pro

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-dontwarn androidx.compose.material.**
2+
-dontwarn META-INF.MANIFEST.MF
3+
-dontwarn kotlinx.serialization.**

0 commit comments

Comments
 (0)