Join Slack
Powered by
Does anyone have R8 working for desktop? I keep ru...
# compose-desktop
s
Sean Proctor
04/10/2024, 3:04 AM
Does anyone have R8 working for desktop? I keep running into weird issues with ProGuard on desktop that I don't have on Android.
m
MR3Y
04/10/2024, 3:36 AM
Because on Android proguard files/rules for libraries that your app depends on are automatically included in your packaged executable but this is not the case on desktop. you have to add your own rules + rules from libraries your app depends on, so, it is more painful process. Take a look at this article in which the author shares his experience reducing desktop app size with proguard:
https://medium.com/@mike_21858/using-proguard-with-jetpack-compose-desktop-size-reduction-performance-gains-and-pain-481a014c6b0a
and previous discussion about this topic:
https://kotlinlang.slack.com/archives/C01D6HTPATV/p1706222701453489
s
Sean Proctor
04/10/2024, 11:33 AM
I think my issues are more related to bugs in ProGuard. R8 seems to handle sealed interfaces better. I need to add rules for my own data structures for desktop that I don't need to add on Android.
m
Marcin Wisniowski
04/11/2024, 10:30 AM
https://kotlinlang.slack.com/archives/C01D6HTPATV/p1702294616584159
Also my thread where I eventually succeeded and shared my config
s
Sean Proctor
04/11/2024, 11:24 AM
That appears to be using ProGuard.
m
Marcin Wisniowski
04/11/2024, 11:50 AM
That’s right. Isn’t R8 Android specific? I didn’t know you can use R8 on desktop.
s
Sean Proctor
04/11/2024, 9:01 PM
A few people have mentioned an intention to use R8.
https://github.com/JetBrains/compose-multiplatform/issues/1604
24
Views
Open in Slack
Previous
Next