As some of you folks might be able to tell. I've r...
# compose-desktop
c
As some of you folks might be able to tell. I've recently been playing around with releases/distribution in compose for desktop, as well as proguard, as well as conveyor. I was finally able to get conveyor to work with proguard. Wrote a bit up here: https://dev.to/coltonidle/compose-for-desktop-app-size-comparison-3d8h App size comparison in thread
๐Ÿ‘ 3
๐Ÿ™Œ๐Ÿฝ 1
๐Ÿ™Œ 6
The summary: 1.
./gradlew packageDmg
No conveyor. 64.9MB for .dmg 124.1MB for .app (what you get when you open .dmg) 2.
./gradlew packageReleaseDmg
No conveyor, but runs proguard. 51.9MB for .dmg 109.9MB for .app (what you get when you open .dmg) 3.
./gradlew packageReleaseDmg
No conveyor, but runs proguard with
obfuscate.set(true)
48MB for .dmg 105.8MB for .app (what you get when you open .dmg) 4.
./gradlew desktopJar && conveyor make site
A regular unproguarded app with conveyor 71.5MB example-1.0.0-mac-aarch64.zip 120.9MB Example.app 5.
./gradlew desktopJar && conveyor make site
A regular unproguarded app with conveyor + conveyor's "native library extraction" 62.3MB example-1.0.0-mac-aarch64.zip 123.8MB Example.app 6.
./gradlew proguardReleaseJars && conveyor make site
Proguarded app with conveyor 58.6MB example-1.0.0-mac-aarch64.zip 106.3MB Example.app 7.
./gradlew proguardReleaseJars && conveyor make site
Proguarded app with conveyor with conveyor's "native library extraction" 49.4MB example-1.0.0-mac-aarch64.zip 109.2MB Example.app 8.
./gradlew proguardReleaseJars && conveyor make site
Proguarded and obfuscated app with conveyor 54.6MB example-1.0.0-mac-aarch64.zip 102.3MB Example.app 9.
./gradlew proguardReleaseJars && conveyor make site
Proguarded and obfuscated app with conveyor with conveyor's "native library extraction" 45.5MB example-1.0.0-mac-aarch64.zip 105.2MB Example.app The winner! I care about initial download size. An app built with conveyor + conveyor's "native library extraction" + proguard + obfuscation (arguably the combo that everyone should aim for) comes in at the smallest download size of 45.5MB. And that contains extra code in there for sparkle (the update framework) that you don't get with the typical
gradlew package*
tasks (and its also supposed to help with small delta updates). Way cool!
๐Ÿ‘ 4
๐Ÿ‘๐Ÿพ 1
This sorta turned into a bit of app size code golf. If anyone has any other ideas for shrinking things down... let me know!
e
I've always been curious if R8 would perform better than proguard, but never had the time to experiment with it (on desktop)
c
i honestly thought that r8 was android only. but can you just use it on any jvm based app? or is it the fact that compose is android-ish so you could possibly use r8? maybe ill add that to my list!
e
It can output class files instead of dex so it can be used for regular jvm apps as well - https://r8.googlesource.com/r8#running-r8
๐Ÿ‘€ 1
today i learned 1