proguard.cfg 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # To enable ProGuard in your project, edit project.properties
  2. # to define the proguard.config property as described in that file.
  3. #
  4. # Add project specific ProGuard rules here.
  5. # By default, the flags in this file are appended to flags specified
  6. # in ${sdk.dir}/tools/proguard/proguard-android.txt
  7. # You can edit the include path and order by changing the ProGuard
  8. # include property in project.properties.
  9. #
  10. # For more details, see
  11. # http://developer.android.com/guide/developing/tools/proguard.html
  12. # Add any project specific keep options here:
  13. # If your project uses WebView with JS, uncomment the following
  14. # and specify the fully qualified class name to the JavaScript interface
  15. # class:
  16. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  17. # public *;
  18. #}
  19. # Optimizations: If you don't want to optimize, use the
  20. # proguard-android.txt configuration file instead of this one, which
  21. # turns off the optimization flags. Adding optimization introduces
  22. # certain risks, since for example not all optimizations performed by
  23. # ProGuard works on all versions of Dalvik. The following flags turn
  24. # off various optimizations known to have issues, but the list may not
  25. # be complete or up to date. (The "arithmetic" optimization can be
  26. # used if you are only targeting Android 2.0 or later.) Make sure you
  27. # test thoroughly if you go this route.
  28. -optimizations !code/simplification/cast,!field/*,!class/merging/*
  29. -optimizationpasses 5
  30. -allowaccessmodification
  31. -dontpreverify
  32. # The remainder of this file is identical to the non-optimized version
  33. # of the Proguard configuration file (except that the other file has
  34. # flags to turn off optimization).
  35. -dontusemixedcaseclassnames
  36. -dontskipnonpubliclibraryclasses
  37. -verbose
  38. # The support library contains references to newer platform versions.
  39. # Don't warn about those in case this app is linking against an older
  40. # platform version. We know about them, and they are safe.
  41. ### Android support
  42. -dontwarn org.apache.http.**
  43. -dontwarn android.support.**
  44. -keep class android.support.** {*;}
  45. -keep class android.webkit.** {*;}
  46. ### keep options, system default, from android example
  47. -keep public class * extends android.app.Activity
  48. -keep public class * extends android.support.v4.app.Fragment
  49. -keep public class * extends android.app.Application
  50. -keep public class * extends android.app.Service
  51. -keep public class * extends android.content.BroadcastReceiver
  52. -keep public class * extends android.content.ContentProvider
  53. -keep public class * extends android.app.backup.BackupAgentHelper
  54. -keep public class * extends android.preference.Preference
  55. -keep public class * extends android.view.View
  56. -keep public class com.google.vending.licensing.ILicensingService
  57. -keep public class com.android.vending.licensing.ILicensingService
  58. -keepattributes *Annotation*,InnerClasses
  59. #-keepattributes SourceFile,LineNumberTable
  60. ### APP 3rd party jars
  61. -dontwarn com.amap.**
  62. -keep class com.amap.** {*;}
  63. -dontwarn com.autonavi.amap.**
  64. -keep class com.autonavi.amap.** {*;}
  65. -dontwarn com.alibaba.**
  66. -keep class com.alibaba.fastjson.** {*;}
  67. ### APP 3rd party jars(xiaomi push)
  68. -dontwarn com.xiaomi.push.**
  69. -keep class com.xiaomi.** {*;}
  70. ### APP 3rd party jars(huawei push)
  71. -ignorewarning
  72. -keepattributes Exceptions
  73. -keepattributes Signature
  74. # hmscore-support: remote transport
  75. -keep class * extends com.huawei.hms.core.aidl.IMessageEntity { *; }
  76. # hmscore-support: remote transport
  77. -keepclasseswithmembers class * implements com.huawei.hms.support.api.transport.DatagramTransport {
  78. <init>(...); }
  79. # manifest: provider for updates
  80. -keep public class com.huawei.hms.update.provider.UpdateProvider { public *; protected *; }
  81. ### APP 3rd party jars(glide)
  82. -keep public class * implements com.bumptech.glide.module.GlideModule
  83. -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  84. **[] $VALUES;
  85. public *;
  86. }
  87. ### org.json xml
  88. -dontwarn org.json.**
  89. -keep class org.json.**{*;}
  90. ### NIM SDK
  91. -dontwarn com.netease.**
  92. -keep class com.netease.** {*;}
  93. -dontwarn org.apache.lucene.**
  94. -keep class org.apache.lucene.** {*;}
  95. -keep class net.sqlcipher.** {*;}
  96. -keepclasseswithmembernames class * {
  97. native <methods>;
  98. }
  99. -keepclasseswithmembers class * {
  100. public <init>(android.content.Context, android.util.AttributeSet);
  101. public <init>(android.content.Context, android.util.AttributeSet, int);
  102. }
  103. -keepclassmembers enum * {
  104. public static **[] values();
  105. public static ** valueOf(java.lang.String);
  106. }
  107. -keep class * implements android.os.Parcelable {
  108. public static final android.os.Parcelable$Creator *;
  109. }
  110. -keepclassmembers class * implements java.io.Serializable {
  111. static final long serialVersionUID;
  112. private static final java.io.ObjectStreamField[] serialPersistentFields;
  113. private void writeObject(java.io.ObjectOutputStream);
  114. private void readObject(java.io.ObjectInputStream);
  115. java.lang.Object writeReplace();
  116. java.lang.Object readResolve();
  117. }
  118. -keep class **.R$* {
  119. *;
  120. }
  121. ##---------------Begin: proguard configuration for Gson ----------
  122. -keep public class com.google.gson.**
  123. -keep public class com.google.gson.** {public private protected *;}
  124. -keepattributes Signature
  125. -keepattributes *Annotation*
  126. -keep class com.sheishuo.app.core_module.circle.model.beans.**{*;}
  127. -keep class com.sheishuo.app.login.beans.**{*;}
  128. -keep class com.sheishuo.app.common.beans.**{*;}
  129. ##---------------End: proguard configuration for Gson ----------
  130. -dontwarn okio.**
  131. -dontwarn javax.annotation.**