|
| 1 | +# To enable ProGuard in your project, edit project.properties |
| 2 | +# to define the proguard.config property as described in that file. |
| 3 | +# |
1 | 4 | # Add project specific ProGuard rules here. |
2 | 5 | # By default, the flags in this file are appended to flags specified |
3 | | -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt |
4 | | -# You can edit the include path and order by changing the proguardFiles |
5 | | -# directive in build.gradle. |
| 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. |
6 | 9 | # |
7 | 10 | # For more details, see |
8 | 11 | # http://developer.android.com/guide/developing/tools/proguard.html |
|
16 | 19 | # public *; |
17 | 20 | #} |
18 | 21 |
|
19 | | -# Disabling obfuscation is useful if you collect stack traces from production crashes |
20 | | -# (unless you are using a system that supports de-obfuscate the stack traces). |
| 22 | +# Optimizations: If you don't want to optimize, use the |
| 23 | +# proguard-android.txt configuration file instead of this one, which |
| 24 | +# turns off the optimization flags. Adding optimization introduces |
| 25 | +# certain risks, since for example not all optimizations performed by |
| 26 | +# ProGuard works on all versions of Dalvik. The following flags turn |
| 27 | +# off various optimizations known to have issues, but the list may not |
| 28 | +# be complete or up to date. (The "arithmetic" optimization can be |
| 29 | +# used if you are only targeting Android 2.0 or later.) Make sure you |
| 30 | +# test thoroughly if you go this route. |
| 31 | + |
21 | 32 | -optimizations !code/simplification/cast,!field/*,!class/merging/* |
22 | 33 | -optimizationpasses 5 |
23 | 34 | -allowaccessmodification |
|
34 | 45 | # The support library contains references to newer platform versions. |
35 | 46 | # Don't warn about those in case this app is linking against an older |
36 | 47 | # platform version. We know about them, and they are safe. |
37 | | --dontwarn android.support.** |
38 | | - |
| 48 | +### Android support |
39 | 49 | -dontwarn org.apache.http.** |
40 | | --dontwarn com.amap.** |
41 | | --dontwarn com.alibaba.** |
42 | | --dontwarn com.netease.** |
43 | | --dontwarn io.netty.** |
44 | | --dontwarn com.autonavi.amap.** |
| 50 | +-dontwarn android.support.** |
| 51 | +-keep class android.support.** {*;} |
| 52 | +-keep class android.webkit.** {*;} |
45 | 53 |
|
46 | | -### keep options |
47 | | -#system default, from android example |
| 54 | +### keep options, system default, from android example |
48 | 55 | -keep public class * extends android.app.Activity |
49 | 56 | -keep public class * extends android.support.v4.app.Fragment |
50 | 57 | -keep public class * extends android.app.Application |
|
60 | 67 | -keepattributes *Annotation*,InnerClasses |
61 | 68 | #-keepattributes SourceFile,LineNumberTable |
62 | 69 |
|
63 | | -### 3rd party jars |
64 | | --keep class android.support.** {*;} |
| 70 | +### APP 3rd party jars |
| 71 | +-dontwarn com.amap.** |
65 | 72 | -keep class com.amap.** {*;} |
66 | | --keep class android.webkit.** {*;} |
| 73 | +-dontwarn com.autonavi.amap.** |
67 | 74 | -keep class com.autonavi.amap.** {*;} |
68 | | --keep class com.nostra13.** {*;} |
| 75 | +-dontwarn com.alibaba.** |
| 76 | +-keep class com.alibaba.fastjson.** {*;} |
69 | 77 |
|
70 | | -### 3rd party jars(xiaomi push) |
| 78 | +### APP 3rd party jars(xiaomi push) |
71 | 79 | -dontwarn com.xiaomi.push.** |
72 | 80 | -keep class com.xiaomi.** {*;} |
73 | 81 |
|
74 | | -### 3rd party jars(lucene) |
75 | | --dontwarn org.apache.lucene.** |
76 | | --keep class org.apache.lucene.** {*;} |
| 82 | +### APP 3rd party jars(huawei push) |
| 83 | + |
| 84 | +-ignorewarning |
| 85 | +-keepattributes Exceptions |
| 86 | +-keepattributes Signature |
| 87 | +# hmscore-support: remote transport |
| 88 | +-keep class * extends com.huawei.hms.core.aidl.IMessageEntity { *; } |
| 89 | +# hmscore-support: remote transport |
| 90 | +-keepclasseswithmembers class * implements com.huawei.hms.support.api.transport.DatagramTransport { |
| 91 | +<init>(...); } |
| 92 | +# manifest: provider for updates |
| 93 | +-keep public class com.huawei.hms.update.provider.UpdateProvider { public *; protected *; } |
| 94 | + |
| 95 | +### APP 3rd party jars(glide) |
| 96 | +-keep public class * implements com.bumptech.glide.module.GlideModule |
| 97 | +-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { |
| 98 | + **[] $VALUES; |
| 99 | + public *; |
| 100 | +} |
| 101 | + |
| 102 | +### org.json xml |
| 103 | +-dontwarn org.json.** |
| 104 | +-keep class org.json.**{*;} |
77 | 105 |
|
78 | | -### nimlib |
| 106 | +### NIM SDK |
| 107 | +-dontwarn com.netease.** |
79 | 108 | -keep class com.netease.** {*;} |
80 | | --keep class com.alibaba.fastjson.** {*;} |
| 109 | +-dontwarn org.apache.lucene.** |
| 110 | +-keep class org.apache.lucene.** {*;} |
81 | 111 | -keep class net.sqlcipher.** {*;} |
82 | 112 |
|
83 | 113 | -keepclasseswithmembernames class * { |
|
0 commit comments