andruhon/android5xlsx

Proguard rules for this library to work

palVikas9 opened this issue · 2 comments

Hi Andruhon,

Thanks for such a lovely port for the spreadsheet reading and writing. Can you please tell me the proguard rules for the library as I am getting an error while building release apk using proguard rules

-keep class com.opencsv.** { ; }
-dontwarn com.opencsv.
*

-keep class org.apache.** {*;}
-dontwarn org.apache.**

-keep com.microsoft.schemas.** {*;}
-dontwarn com.microsoft.schemas.**

-keep org.openxmlformats.schemas.spreadsheetml.** {*;}
-dontwarn org.openxmlformats.schemas.**

-dontwarn com.squareup.picasso.**
-keep class com.squareup.picasso.** { *; }

-keepattributes InnerClasses
-dontoptimize

These are the rules that have been defined other than some android default libraries.

Hi! I didn't apply any particular proguard rules for this one. All you have to ensure that proguard doesn't chop any classes out of schemas, because they are called via reflections and proguard cannot know that they are used at all.

Thanks! ProGuard Rules Example as shown below,and run this successfully on android
-keep class org.** { ; }
-keep class com.bea.xml.stream.**{
;}
-keep class org.apache.xmlbeans.** { ; }
-keep class com.microsoft.
* { ; }
-keep class org.openxmlformats.**{
;}
-keep class com.apache.poi.** { ; }
-keep class schemaorg_apache_xmlbeans.
* {*;}