proguard-rules.pro 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Adapted from example file:
  3. # android-sdk/tools/proguard/examples/library.pro
  4. #
  5. # This ProGuard configuration file illustrates how to process a program
  6. # library, such that it remains usable as a library.
  7. #
  8. # Don't obfuscate field and method names.
  9. -dontobfuscate
  10. # Preserve all annotations.
  11. -keepattributes *Annotation*
  12. # Preserve all public classes, and their public and protected fields and
  13. # methods.
  14. -keep public class * {
  15. public protected *;
  16. }
  17. # Preserve all .class method names.
  18. -keepclassmembernames class * {
  19. java.lang.Class class$(java.lang.String);
  20. java.lang.Class class$(java.lang.String, boolean);
  21. }
  22. # Preserve all native method names and the names of their classes.
  23. -keepclasseswithmembernames class * {
  24. native <methods>;
  25. }
  26. # Preserve the special static methods that are required in all enumeration
  27. # classes.
  28. -keepclassmembers class * extends java.lang.Enum {
  29. public static **[] values();
  30. public static ** valueOf(java.lang.String);
  31. }
  32. # Explicitly preserve all serialization members. The Serializable interface
  33. # is only a marker interface, so it wouldn't save them.
  34. # You can comment this out if your library doesn't use serialization.
  35. # If your code contains serializable classes that have to be backward
  36. # compatible, please refer to the manual.
  37. -keepclassmembers class * implements java.io.Serializable {
  38. static final long serialVersionUID;
  39. static final java.io.ObjectStreamField[] serialPersistentFields;
  40. private void writeObject(java.io.ObjectOutputStream);
  41. private void readObject(java.io.ObjectInputStream);
  42. java.lang.Object writeReplace();
  43. java.lang.Object readResolve();
  44. }
  45. # Your library may contain more items that need to be preserved;
  46. # typically classes that are dynamically created using Class.forName:
  47. # -keep public class mypackage.MyClass
  48. # -keep public interface mypackage.MyInterface
  49. # -keep public class * implements mypackage.MyInterface
  50. -keep class com.googlecode.tesseract.android.TessBaseAPI {
  51. protected void onProgressValues(int, int, int, int, int, int, int, int, int);
  52. }