Proguard removing chunktemplate functionality on build release
Description of the problem
The chunk template ( https://code.google.com/p/chunk-templates/ ) works correctly with my debug builds. If I create a release version with the same code, it just stops working. If I disable proguard in my release version everything works again. So I'm pretty sure his proguard is removing too much from the library during optimization.
While I did my first release build some block code error messages appeared. With the following statement progurad was able to create a release build (-dontwarn com.x5. **). After some testing, I found out that the block template functionality is not working.
The statements I've tried (from proguard config)
- libraryjars / home / ydoganc / projects / contract_info / libs / chunk_2.4 / chunk_template_2.4.jar
- dontwarn com.x5. ** # compiles without error, but doesn't work.
- save the net.minidev.json class. ** {*;}
- keep the com.x5.template class. ** {*; }
- keep the net.minidev class. ** {*; }
Is there a way to prevent pro-eye processing library jars? It looks like proguard is not doing what its config files say.
Proguard error messages (after disabling the -dontwarn com.x5. ** ... instruction):
[2014-10-28 23:33:32 - ContractInfoListActivity] Proguard returned with error code 1. See console [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.JSONValue [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.JSONValue [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.JSONArray [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.ParseException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.JSONParser [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.JSONParser [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.ContainerFactory [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.ContainerFactory [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.MacroTag: can't find referenced class net.minidev.json.parser.JSONParser [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64DecodeFilter: can't find referenced class sun.misc.BASE64Decoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64DecodeFilter: can't find referenced class sun.misc.BASE64Decoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64DecodeFilter: can't find referenced class sun.misc.BASE64Decoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64EncodeFilter: can't find referenced class sun.misc.BASE64Encoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64EncodeFilter: can't find referenced class sun.misc.BASE64Encoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Base64EncodeFilter: can't find referenced class sun.misc.BASE64Encoder [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.ParseException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.ParseException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.ParseException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.JEP [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.template.filters.Calc: can't find referenced class org.cheffo.jeplite.ParseException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.Introspector [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.Introspector [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.IntrospectionException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.IntrospectionException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ MadRobotIntrospector: can't find referenced class com.madrobot.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.Introspector [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.Introspector [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.IntrospectionException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.BeanInfo [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.IntrospectionException [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: com.x5.util.ObjectDataMap $ StandardIntrospector: can't find referenced class java.beans.PropertyDescriptor [2014-10-28 23:33:32 - ContractInfoListActivity] You should check if you need to specify additional program jars. [2014-10-28 23:33:32 - ContractInfoListActivity] Warning: there were 55 unresolved references to classes or interfaces. [2014-10-28 23:33:32 - ContractInfoListActivity] You may need to specify additional library jars (using '-libraryjars'). [2014-10-28 23:33:32 - ContractInfoListActivity] java.io.IOException: Please correct the above warnings first. [2014-10-28 23:33:32 - ContractInfoListActivity] at proguard.Initializer.execute (Initializer.java:321) [2014-10-28 23:33:32 - ContractInfoListActivity] at proguard.ProGuard.initialize (ProGuard.java:211) [2014-10-28 23:33:32 - ContractInfoListActivity] at proguard.ProGuard.execute (ProGuard.java:86) [2014-10-28 23:33:32 - ContractInfoListActivity] at proguard.ProGuard.main (ProGuard.java:492)
+3
source to share