My desktop size app stays 184MB after enabling Pro...
# compose-desktop
y
My desktop size app stays 184MB after enabling ProGuard in Gradle. No size change after
./gradlew packageDmg
. What's wrong? here is the gradle code:
Copy code
compose.desktop {
    application {
        mainClass = "org.yassineabou.playground.MainKt"

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "org.yassineabou.playground"
            packageVersion = "1.0.0"

            macOS {
                iconFile.set(project.file("src/commonMain/composeResources/drawable/macos.icns"))
            }
            windows {
                iconFile.set(project.file("src/commonMain/composeResources/drawable/windows.ico"))
            }
            linux {
                iconFile.set(project.file("src/commonMain/composeResources/drawable/linux.png"))
            }
        }

        buildTypes.release.proguard {
            version.set("1.0.0")
            configurationFiles.from(project.file("proguard-rules.pro"))
            isEnabled.set(true)
            obfuscate.set(true)
            optimize.set(true)
        }

    }
}
a
Maybe
./gradlew packageReleaseDmg
?
1
y
What terminal command should I use then?
c
I'm personally also confused about proguard. and im trying to figure it out myself. I do see a difference between packageDmg and packageReleaseDmg though when just using a new project form kmp.jetbrains.com
y
After running
packageReleaseDmg
, the app size decreased by 60 MB, but the current size 120 MB still seems large for a simple prototype app
a
That’s about what is expected from a small/empty Compose for Desktop app.
The distributable includes the JVM and Skia (the rendering engine Compose uses).