proguard-rules.pro 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Add project specific ProGuard rules here.
  2. # By default, the flags in this file are appended to flags specified
  3. # in D:\work\software\SDK/tools/proguard/proguard-android.txt
  4. # You can edit the include path and order by changing the proguardFiles
  5. # directive in build.gradle.
  6. #
  7. # For more details, see
  8. # http://developer.android.com/guide/developing/tools/proguard.html
  9. # Add any project specific keep options here:
  10. # If your project uses WebView with JS, uncomment the following
  11. # and specify the fully qualified class name to the JavaScript interface
  12. # class:
  13. -keepclassmembers class fqcn.of.javascript.interface.for.webview {
  14. public *;
  15. }
  16. # Uncomment this to preserve the line number information for
  17. # debugging stack traces.
  18. #-keepattributes SourceFile,LineNumberTable
  19. # If you keep the line number information, uncomment this to
  20. # hide the original source file name.
  21. #-renamesourcefileattribute SourceFile
  22. -dontwarn okhttp3.**
  23. -dontwarn okio.**
  24. -dontwarn javax.annotation.**
  25. # A resource is loaded with a relative path so the package of this class must be preserved.
  26. -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
  27. -keep class com.tencent.mm.opensdk.** { *;}
  28. -keep class com.tencent.wxop.** { *;}
  29. -keep class com.tencent.mm.sdk.** { *;}
  30. -dontwarn com.tencent.bugly.**
  31. -keep public class com.tencent.bugly.**{*;}
  32. -keep class android.support.**{*;}
  33. #指定代码的压缩级别
  34. -optimizationpasses 5
  35. #不去忽略非公共的库类
  36. -dontskipnonpubliclibraryclasses
  37. -dontskipnonpubliclibraryclassmembers
  38. # 是否使用大小写混合
  39. -dontusemixedcaseclassnames
  40. #预校验
  41. -dontpreverify
  42. #混淆时是否记录日志
  43. -verbose
  44. #忽略警告,避免打包时某些警告出现
  45. -ignorewarning
  46. # 混淆时所采用的算法
  47. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  48. #保护注解
  49. -keepattributes *Annotation*
  50. #记录生成的日志数据,gradle build时在本项目根目录输出
  51. #apk 包内所有 class 的内部结构
  52. -dump class_files.txt
  53. #未混淆的类和成员
  54. -printseeds seeds.txt
  55. #列出从 apk 中删除的代码
  56. -printusage unused.txt
  57. #混淆前后的映射
  58. -printmapping mapping.txt
  59. # 保持哪些类不被混淆
  60. -keep public class * extends android.app.Activity
  61. -keep public class * extends android.app.Fragment
  62. -keep public class * extends android.app.Application
  63. -keep public class * extends android.app.Service
  64. -keep public class * extends android.content.BroadcastReceiver
  65. -keep public class * extends android.content.ContentProvider
  66. -keep public class * extends android.app.backup.BackupAgentHelper
  67. -keep public class * extends android.preference.Preference
  68. -keep public class com.android.vending.licensing.ILicensingService
  69. -keep public class * implements java.io.Serializable
  70. -keepattributes *Annotation*
  71. -keepclassmembers class ** {
  72. @org.greenrobot.eventbus.Subscribe <methods>;
  73. }
  74. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  75. # Only required if you use AsyncExecutor
  76. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  77. <init>(java.lang.Throwable);
  78. }