Yassine Abou
03/26/2025, 2:42 AM./gradlew packageReleaseDmg
and running the generated DMG, Coil Compose (3.0.4) fails to load images. The issue occurs only in the release build. Images load correctly in debug builds. My compose plugin version: 1.7.3
I tried adding Coil to the ProGuard rules, but the issue is still remaining. what proguard rule should I add?
For more details. See the threadYassine Abou
03/26/2025, 3:00 AM# Only keeps coroutines.swing classes
-keep class kotlinx.coroutines.swing.** { *; }
2.build.gradle File:
--
// Shared Code Dependencies
sourceSets {
androidMain.dependencies {
---
implementation(libs.ktor.client.android)
}
commonMain.dependencies {
---
// Coil Image Loading
implementation(libs.coil.compose) // Coil for Compose
implementation(libs.coil.network.ktor3) // Coil + Ktor Networking
}
// Desktop-Specific Dependencies
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.ktor.client.java) // Ktor HTTP Engine for Desktop
}
appleMain.dependencies {
implementation(libs.ktor.client.darwin)
}
}
---
compose.desktop {
application {
---
// Release Build Settings
buildTypes.release.proguard {
obfuscate.set(true)
configurationFiles.from(project.file("<http://compose-proguard.pro|compose-proguard.pro>"))
}
}
}
Michael Paus
03/26/2025, 8:19 AMAleksha
03/26/2025, 12:01 PMcompose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg,
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Msi,
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Deb
)
packageName = "my_app"
packageVersion = "1.0.0"
modules(
"java.sql",
"java.net.http",
"jdk.unsupported",
"jdk.security.auth",
)
}
buildTypes.release.proguard {
obfuscate.set(true)
configurationFiles.from(project.file("assemble/proguard-rules.pro"))
}
}
}
or run the app from IDE with release flags to get more details regarding the issue in IDE output.Colton Idle
03/26/2025, 12:31 PMColton Idle
03/26/2025, 12:32 PMYassine Abou
03/26/2025, 7:17 PMjava.net.http
module in the native distribution and added the ProGuard rules suggested by Colton Idle
, but the issue still isn't resolved. Here's the link to my repository for more details: https://github.com/yassineAbou/LLMSColton Idle
03/26/2025, 7:55 PMYassine Abou
03/26/2025, 8:13 PM