proguard-rules.pro 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. #-keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. -ignorewarnings
  20. -optimizationpasses 5 # 指定代码的压缩级别
  21. -dontusemixedcaseclassnames # 是否使用大小写混合
  22. -dontpreverify # 混淆时是否做预校验
  23. -verbose # 混淆时是否记录日志
  24. # 保持行号
  25. -keepattributes SourceFile,LineNumberTable
  26. # androidX
  27. -dontwarn org.xmlpull.v1.XmlPullParser
  28. -dontwarn org.xmlpull.v1.XmlSerializer
  29. -keep class org.xmlpull.v1.* {*;}
  30. -keep class com.google.android.material.** { *; }
  31. -dontwarn com.google.android.material.**
  32. -dontnote com.google.android.material.**
  33. -dontwarn androidx.**
  34. -keep class androidx.** { *; }
  35. -keep interface androidx.** { *; }
  36. # kotlin
  37. -keep class kotlin.** { *; }
  38. -keep class kotlin.Metadata { *; }
  39. -dontwarn kotlin.**
  40. -keepclassmembers class **$WhenMappings {
  41. <fields>;
  42. }
  43. -keepclassmembers class kotlin.Metadata {
  44. public <methods>;
  45. }
  46. -assumenosideeffects class kotlin.jvm.internal.Intrinsics {
  47. static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
  48. }
  49. -keep class com.hgsoft.log.** { *; }
  50. # keep Xlog
  51. -keep class com.safframework.log.** {*;}
  52. # keep zip4j
  53. -keep class net.lingala.zip4j.** { *;}