proguard-rules.pro 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #-keepclassmembers class com.pan_american.android.data.model.** {*;}
  19. #
  20. #-keep class com.haibin.calendarview.** {*;}
  21. #
  22. #-keep class com.microsoft.signalr.** {*;}
  23. #
  24. #-optimizationpasses 5 # 代码混淆的压缩比例,值介于0-7,默认5
  25. #-verbose # 混淆时记录日志
  26. #-dontoptimize # 不优化输入的类文件
  27. #-ignorewarnings # 忽略警告
  28. #-dontwarn com.squareup.okhttp.** # 指定类不输出警告信息
  29. #-dontusemixedcaseclassnames # 混淆后类型都为小写
  30. #-printmapping mapping.txt # 生成原类名与混淆后类名的映射文件mapping.txt
  31. #-allowaccessmodification # 优化时允许访问并修改有修饰符的类及类的成员
  32. #-renamesourcefileattribute SourceFile # 将源码中有意义的类名转换成SourceFile,用于混淆具体崩溃代码
  33. #-keepattributes SourceFile,LineNumberTable # 保留行号
  34. #-keepattributes *Annotation*,InnerClasses,Signature,EnclosingMethod # 避免混淆注解、内部类、泛型、匿名类
  35. #-optimizations !code/simplification/cast,!field/ ,!class/merging/ # 指定混淆时采用的算法