From 64ff33226d273c34b3a36731c1e2d5faaada8e6e Mon Sep 17 00:00:00 2001 From: imndx Date: Sun, 26 Jul 2020 13:15:23 +0800 Subject: [PATCH] fix proguard issue. fix #397 --- chat/proguard-rules.pro | 74 ++++++++++++++++++++++++++++++++++++++-- uikit/proguard-rules.pro | 5 --- 2 files changed, 71 insertions(+), 8 deletions(-) diff --git a/chat/proguard-rules.pro b/chat/proguard-rules.pro index 481bb4348..d8240fb9b 100644 --- a/chat/proguard-rules.pro +++ b/chat/proguard-rules.pro @@ -1,10 +1,14 @@ # Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# By default, the flags in this file are appended to flags specified +# in E:\AndroidSoft\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html +# Add any project specific keep options here: + # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: @@ -18,4 +22,68 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +-dontwarn com.tencent.bugly.** +-keep public class com.tencent.bugly.**{*;} + +-dontshrink +-keep class org.webrtc.** { *; } +-keepclasseswithmembernames class * { native ; } + +-keep class okhttp3.** {*;} +-keepclassmembers class okhttp3.** { + *; +} + +-keep class com.tencent.**{*;} +-keepclassmembers class com.tenncent.mars.** { + *; +} + +#-keep class !cn.wildfire.chat.moment.**,!cn.wildfirechat.moment.**, **{ *; } +-keep class cn.wildfirechat.moment.MomentClient { + public void init(***); +} + +-keep class cn.wildfire.chat.app.login.model.** {*;} +-keepclassmembers class cn.wildfire.chat.app.login.model.** { + *; +} + +-keep class cn.wildfire.chat.kit.net.base.** {*;} +-keepclassmembers class cn.wildfire.chat.kit.net.base.** { + *; +} + +-keep class cn.wildfire.chat.kit.group.GroupAnnouncement {*;} +-keepclassmembers class cn.wildfire.chat.kit.group.GroupAnnouncement { + *; +} + +-keep class cn.wildfirechat.model.** {*;} +-keepclassmembers class cn.wildfirechat.model.** { + *; +} + +-keepclassmembers class cn.wildfirechat.** { + (...); +} + +-keepclassmembers class cn.wildfire.** { + (...); +} + +-keep class net.sourceforge.pinyin4j.** { *;} + + +#huawei push +-ignorewarnings +-keepattributes *Annotation* +-keepattributes Exceptions +-keepattributes InnerClasses +-keepattributes Signature +-keepattributes SourceFile,LineNumberTable +-keep class com.hianalytics.android.**{*;} +-keep class com.huawei.updatesdk.**{*;} +-keep class com.huawei.hms.**{*;} diff --git a/uikit/proguard-rules.pro b/uikit/proguard-rules.pro index d8240fb9b..9d59b011e 100644 --- a/uikit/proguard-rules.pro +++ b/uikit/proguard-rules.pro @@ -46,11 +46,6 @@ public void init(***); } --keep class cn.wildfire.chat.app.login.model.** {*;} --keepclassmembers class cn.wildfire.chat.app.login.model.** { - *; -} - -keep class cn.wildfire.chat.kit.net.base.** {*;} -keepclassmembers class cn.wildfire.chat.kit.net.base.** { *;