Are we supposed to use proguard when packaging com...
# compose-desktop
j
Are we supposed to use proguard when packaging compose desktop .deb files? I’m stuck with trying to fix warnings in proguard Maybe just add `
Copy code
-ignorewarnings
in proguard-rules.pro? EDIT: I suspect that my
proguard-pro
file is not applied to JVM/Desktop. How is the proguard file connected to the desktop application? because using the
-ignorewarnings
in the proguard file is not working
a
You don’t have to, but typically you’d want to.
j
It’s not working. How do I disable proguard for desktop only?
ahhh: “For each default (without ProGuard) packaging task, the Gradle plugin provides a release task (with ProGuard):”
Can I just do
./gradlew packageDeb
and host the deb on a website?
a
Sure
m
You should configure ProGuard in your build.gradle.kts file. Example:
Copy code
compose.desktop {
    application {
        ...
        buildTypes.release {
            proguard {
                version.set("7.7")
                isEnabled.set(false)
                optimize.set(false)
                obfuscate.set(false)
                configurationFiles.from(project.file("<http://compose-desktop.pro|compose-desktop.pro>"))
            }
        }
    }
}
The above example effectively disables ProGuard.
a
But then, what’s the difference between that and the non-
release
tasks?
m
You can always use the release tasks as usual but you can still switch on/off certain aspects of ProGuard depending on your needs.