proguard-rules.pro 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. -printconfiguration build/outputs/fullProguardConfig.pro
  2. -dontshrink
  3. -keepclassmembers class * {
  4. @com.tencent.luggage.wxa.SaaA.plugin.SyncJsApi *;
  5. @com.tencent.luggage.wxa.SaaA.plugin.AsyncJsApi *;
  6. }
  7. -keep class com.donut.plugin.* {*;}
  8. # Add project specific ProGuard rules here.
  9. # You can control the set of applied configuration files using the
  10. # proguardFiles setting in build.gradle.
  11. #
  12. # For more details, see
  13. # http://developer.android.com/guide/developing/tools/proguard.html
  14. # If your project uses WebView with JS, uncomment the following
  15. # and specify the fully qualified class name to the JavaScript interface
  16. # class:
  17. -keepclassmembers class fqcn.of.javascript.interface.for.webview {
  18. public *;
  19. }
  20. # Uncomment this to preserve the line number information for
  21. # debugging stack traces.
  22. -keepattributes SourceFile,LineNumberTable
  23. # If you keep the line number information, uncomment this to
  24. # hide the original source file name.
  25. -renamesourcefileattribute SourceFile
  26. # 屏蔽警告
  27. -ignorewarnings
  28. # 指定混淆是采用的算法,后面的参数是一个过滤器
  29. # 这个过滤器是谷歌推荐的算法,一般不做更改
  30. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  31. # 保护代码中的Annotation不被混淆
  32. -keepattributes *Annotation*
  33. # 避免混淆泛型, 这在JSON实体映射时非常重要
  34. -keepattributes Signature
  35. # 抛出异常时保留代码行号
  36. -keepattributes SourceFile,LineNumberTable
  37. #优化时允许访问并修改有修饰符的类和类的成员,这可以提高优化步骤的结果。
  38. # 比如,当内联一个公共的getter方法时,这也可能需要外地公共访问。
  39. # 虽然java二进制规范不需要这个,要不然有的虚拟机处理这些代码会有问题。当有优化和使用-repackageclasses时才适用。
  40. #指示语:不能用这个指令处理库中的代码,因为有的类和类成员没有设计成public ,而在api中可能变成public
  41. -allowaccessmodification
  42. #当有优化和使用-repackageclasses时才适用。
  43. #-repackageclasses com.test
  44. # 混淆时记录日志(打印混淆的详细信息)
  45. # 这句话能够使我们的项目混淆后产生映射文件
  46. # 包含有类名->混淆后类名的映射关系filename.txt
  47. ##-classobfuscationdictionary filename.txt
  48. ##-packageobfuscationdictionary f
  49. #-obfuscationdictionary ilename.txt
  50. -verbose
  51. -keep class .R -keepclasseswithmembers class *.R$* { public static <fields>;}
  52. # 保留枚举类不被混淆
  53. -keepclassmembers enum * {
  54. public static **[] values();
  55. public static ** valueOf(java.lang.String);
  56. }
  57. -keep public class android.net.http.SslError
  58. -keep public class android.webkit.WebViewClient
  59. -dontwarn android.webkit.WebView
  60. -dontwarn android.net.http.SslEr
  61. -dontwarn android.webkit.WebViewClient
  62. #--------------ludp和oaid资源混淆忽略-------start#
  63. -keep class com.lenovo.lps.reaper.**{*;}
  64. -keep class com.lenovo.lps.reaper.*$* {
  65. *;
  66. }
  67. -dontwarn com.lenovo.lps.reaper.**
  68. -keep class org.greenrobot.greendao.**{*;}
  69. -keep class org.greenrobot.greendao.*$* {
  70. *;
  71. }
  72. -dontwarn org.greenrobot.greendao.**
  73. -keep class com.lenovo.lsf.gamesdk.oaid.** { *; }
  74. -keep class com.lenovo.lsf.gamesdk.oaid.*$* { *; }
  75. -keep class com.asus.msa.**{*;}
  76. -keep class com.asus.msa.*$* {
  77. *;
  78. }
  79. -keep class com.bun.**{*;}
  80. -keep class com.bun.*$* {
  81. *;
  82. }
  83. -keep class com.huawei.hms.ads.identifier.**{*;}
  84. -keep class com.huawei.hms.ads.identifier.*$* {
  85. *;
  86. }
  87. -keep class com.netease.nis.sdkwrapper.**{*;}
  88. -keep class com.netease.nis.sdkwrapper.*$* {
  89. *;
  90. }
  91. -keep class com.samsung.android.deviceidservice.**{*;}
  92. -keep class com.samsung.android.deviceidservice.*$* {
  93. *;
  94. }
  95. -keep class com.zui.**{*;}
  96. -keep class com.zui.*$* {
  97. *;
  98. }
  99. -dontwarn com.asus.msa.**
  100. -dontwarn com.bun.**
  101. -dontwarn com.huawei.hms.ads.identifier.**
  102. -dontwarn com.netease.nis.sdkwrapper.**
  103. -dontwarn com.samsung.android.deviceidservice.**
  104. -dontwarn com.zui.**
  105. #--------------ludp和oaid资源混淆忽略-------end#
  106. #--------------支付资源混淆忽略-------start#
  107. -keep class com.google.zxing.**{*;}
  108. -keep class com.google.zxing.*$* {
  109. *;
  110. }
  111. -dontwarn com.google.zxing.**
  112. -dontwarn com.alipay.**
  113. -keep class com.alipay.**{*;}
  114. -keep class org.json.alipay.**{*;}
  115. -keep class org.json.alipay.*$* {
  116. *;
  117. }
  118. -dontwarn org.json.alipay.**
  119. #--------------支付资源混淆忽略-------end#
  120. #--------------lenovoId源混淆忽略-------start#
  121. -keep class com.lenovo.lsf.**{*;}
  122. -keep class com.lenovo.lsf.*$* {
  123. *;
  124. }
  125. -dontwarn com.lenovo.lsf.**
  126. #--------------lenovoId源混淆忽略-------end#
  127. -keep class com.lenovo.intermodal.bean.**{*;}
  128. -keep class com.lenovo.intermodal.bean.*$* {
  129. *;
  130. }
  131. -dontwarn com.lenovo.intermodal.bean.**
  132. -keep class com.lenovo.intermodal.api.**{*;}
  133. -keep class com.lenovo.intermodal.api.*$* {
  134. *;
  135. }
  136. -dontwarn com.lenovo.intermodal.api.**
  137. -keep class com.lenovo.intermodal.request.**{*;}
  138. -keep class com.lenovo.intermodal.request.*$* {
  139. *;
  140. }
  141. -dontwarn com.lenovo.intermodal.request.**