proguard-rules.pro 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. -keep class com.umeng.commonsdk.** {*;}
  35. #指定代码的压缩级别
  36. -optimizationpasses 5
  37. #不去忽略非公共的库类
  38. -dontskipnonpubliclibraryclasses
  39. -dontskipnonpubliclibraryclassmembers
  40. # 是否使用大小写混合
  41. -dontusemixedcaseclassnames
  42. #预校验
  43. -dontpreverify
  44. #混淆时是否记录日志
  45. -verbose
  46. #忽略警告,避免打包时某些警告出现
  47. -ignorewarning
  48. # 混淆时所采用的算法
  49. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  50. #保护注解
  51. -keepattributes *Annotation*
  52. #记录生成的日志数据,gradle build时在本项目根目录输出
  53. #apk 包内所有 class 的内部结构
  54. -dump class_files.txt
  55. #未混淆的类和成员
  56. -printseeds seeds.txt
  57. #列出从 apk 中删除的代码
  58. -printusage unused.txt
  59. #混淆前后的映射
  60. -printmapping mapping.txt
  61. # 保持哪些类不被混淆
  62. -keep public class * extends android.app.Activity
  63. -keep public class * extends android.app.Fragment
  64. -keep public class * extends android.app.Application
  65. -keep public class * extends android.app.Service
  66. -keep public class * extends android.content.BroadcastReceiver
  67. -keep public class * extends android.content.ContentProvider
  68. -keep public class * extends android.app.backup.BackupAgentHelper
  69. -keep public class * extends android.preference.Preference
  70. -keep public class com.android.vending.licensing.ILicensingService
  71. -keep public class * implements java.io.Serializable
  72. -keepattributes *Annotation*
  73. -keepclassmembers class ** {
  74. @org.greenrobot.eventbus.Subscribe <methods>;
  75. }
  76. -keep enum org.greenrobot.eventbus.ThreadMode { *; }
  77. # Only required if you use AsyncExecutor
  78. -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
  79. <init>(java.lang.Throwable);
  80. }