proguard-rules.pro 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ## ==========================================
  2. ## 通用设置
  3. ## ==========================================
  4. ## 压缩优化算法
  5. #-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  6. ## 迭代优化次数
  7. #-optimizationpasses 5
  8. ## 禁止优化
  9. #-dontoptimize
  10. ## 禁止缩减代码
  11. #-dontshrink
  12. ## 禁止多样化类名
  13. #-dontusemixedcaseclassnames
  14. ## 禁止混淆公共LIB类
  15. #-dontskipnonpubliclibraryclasses
  16. ## 禁止预先验证
  17. #-dontpreverify
  18. ## 忽略警告信息
  19. #-ignorewarnings
  20. ## 输出详细LOG
  21. #-verbose
  22. ## 保持@JavascriptInterface annotations 不被混淆掉
  23. #-keepattributes *Annotation*
  24. #
  25. ## 禁止混淆类
  26. #-keep public class * extends android.app.Activity
  27. #-keep public class * extends android.app.Application
  28. #-keep public class * extends android.app.Service
  29. #-keep public class * extends android.content.BroadcastReceiver
  30. #-keep public class * extends android.content.ContentProvider
  31. #-keep public class com.android.vending.licensing.ILicensingService
  32. #-keep public class * extends android.app.Activity
  33. #
  34. ## 禁止混淆本地方法
  35. #-keepclasseswithmembernames class * {
  36. # native <methods>;
  37. #}
  38. #
  39. ## 禁止混淆枚举类型
  40. #-keepclassmembers,allowoptimization enum * {
  41. # public static **[] values();
  42. # public static ** valueOf(java.lang.String);
  43. #}
  44. #
  45. ## 禁止混淆初始化方法
  46. #-keepclasseswithmembers class * {
  47. # public <init>(android.content.Context, android.util.AttributeSet);
  48. #}
  49. #-keepclasseswithmembers class * {
  50. # public <init>(android.content.Context, android.util.AttributeSet, int);
  51. #}
  52. #
  53. ## 禁止混淆Parcelable对象
  54. #-keepclassmembers class * implements android.os.Parcelable {
  55. # static android.os.Parcelable$Creator CREATOR;
  56. #}
  57. #
  58. ## 禁止混淆Serializable对象
  59. #-keepnames class * implements java.io.Serializable
  60. #-keepclassmembers class * implements java.io.Serializable {
  61. # static final long serialVersionUID;
  62. # private static final java.io.ObjectStreamField[] serialPersistentFields;
  63. # !static !transient <fields>;
  64. # private void writeObject(java.io.ObjectOutputStream);
  65. # private void readObject(java.io.ObjectInputStream);
  66. # java.lang.Object writeReplace();
  67. # java.lang.Object readResolve();
  68. #}
  69. #
  70. ## 禁止混淆二维码解析SDK
  71. ##-libraryjars libs/facesdk.jar
  72. #-dontwarn com.baidu.idl.facesdk.FaceInfo
  73. #-dontwarn com.baidu.idl.facesdk.FaceSDK
  74. #-dontwarn com.baidu.idl.facesdk.FaceTracker
  75. #-dontwarn com.baidu.idl.facesdk.FaceVerifyData
  76. #-keep class com.baidu.idl.facesdk.FaceInfo { *; }
  77. #-keep class com.baidu.idl.facesdk.FaceSDK { *; }
  78. #-keep class com.baidu.idl.facesdk.FaceTracker { *; }
  79. #-keep class com.baidu.idl.facesdk.FaceVerifyData { *; }
  80. #