Kodein icon indicating copy to clipboard operation
Kodein copied to clipboard

Document Proguard Rules for JVM

Open mikedawson opened this issue 1 year ago • 0 comments

Hi,

I'm using Compose Desktop as part of my multiplatform app (currently using KodeIN DI for Android, Desktop/JVM, Server/JVM, and JS).

The proguard rules for Android as per https://kosi-libs.org/kodein/7.21/framework/android.html#_proguard_configuration need an addition for JVM to keep the generic type info in supertype (in addition to the rules used on Android):

-keepattributes Signature

Proguard decreased the size of our distributable by around 50% (that's including the JVM distributable, so it probably decreased JAR size by around 75%).

Can this be added to the documentation? Maybe in the JVM section? https://kosi-libs.org/kodein/7.21/core/install.html#install-jvm. JVM doesn't have automatic rule consumption like Android, so having this in the docs becomes that much more important.

Thanks!

mikedawson avatar Jan 27 '24 11:01 mikedawson