From 2202041e80deca9603fcae060a37f8d541a6b810 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 19 Dec 2017 00:48:11 -0800 Subject: [PATCH] Fix issues with proguard --- mobile/proguard-rules.pro | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/mobile/proguard-rules.pro b/mobile/proguard-rules.pro index 270d368e..ff20eb60 100644 --- a/mobile/proguard-rules.pro +++ b/mobile/proguard-rules.pro @@ -12,14 +12,12 @@ # public *; #} -# Uncomment this to preserve the line number information for -# debugging stack traces. --keepattributes SourceFile,LineNumberTable -dontobfuscate -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile +-keepattributes SourceFile,LineNumberTable,Signature +-keepattributes *DatabaseField* +-keepattributes *DatabaseTable* +-keepattributes *SerializedName* -dontwarn com.j256.ormlite.** -dontwarn com.google.android.gms.internal.** @@ -28,3 +26,24 @@ -dontwarn org.xbill.** -dontwarn com.evernote.android.job.gcm.** -dontwarn com.evernote.android.job.util.GcmAvailableHelper + +-keep public class android.support.v7.widget.** { *; } +-keep public class android.support.v7.internal.widget.** { *; } +-keep public class android.support.v7.internal.view.menu.** { *; } + +-keep public class * extends android.support.v4.view.ActionProvider { + public (android.content.Context); +} + +-keep class com.github.shadowsocks** {*;} +-keep interface com.github.shadowsocks** {*;} +-keep enum com.github.shadowsocks** {*;} + +-keep class com.j256.** +-keepclassmembers class com.j256.** { *; } +-keep enum com.j256.** +-keepclassmembers enum com.j256.** { *; } +-keep interface com.j256.** +-keepclassmembers interface com.j256.** { *; } + +-optimizations !code/allocation/variable