From a5c33f1cf58c6e7af49a3d64eae7788923e23c32 Mon Sep 17 00:00:00 2001 From: Samidh Talsania Date: Sun, 26 Apr 2015 19:58:17 +0530 Subject: [PATCH] Fixed proguard config. --- .../main/pl/surecase/eu/MyDaoGenerator.class | Bin 1546 -> 0 bytes app/build.gradle | 2 +- app/proguard-rules.pro | 116 +++++++++++++++++- .../dota2ticker/async/RestClient.java | 2 +- 4 files changed, 116 insertions(+), 4 deletions(-) delete mode 100644 MyDaoGenerator/build/classes/main/pl/surecase/eu/MyDaoGenerator.class diff --git a/MyDaoGenerator/build/classes/main/pl/surecase/eu/MyDaoGenerator.class b/MyDaoGenerator/build/classes/main/pl/surecase/eu/MyDaoGenerator.class deleted file mode 100644 index 00a96542a616c49644251fb4d6e0546cf858e3fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1546 zcmb7EZBr6a6n-wCyWlDcW-n%DS|XUMSZQgNFK8sFg`?y2p}D{f*I9O*WohJR^#x~g z#vjm+YC0EOsfNLVnRD(r_q;skEQb(5T$0xcRusHp=w3D~!(CzU$EFS#0_%2BFoZLP zC3dRiym0n;-Xu*VV;8u2z#T)%SIU5UY*ZLVGpD9rsXC&-D?%4lJzLx0_Li`O!(H21 zqOfIdSPVn4Pni?`mFp(AN_x(946C%%NXwlP1&X%0CWw{7u_$wf@k~+ZB}WL$vGca8 z7r9;XlIXdH5#{pd?Xw$fQB6nj?SN)wSA&_`<6u1qMY<|=!44C()^&vR`PKTPp6 zwpH>>=q-|F&9+U!t(LOq>M4j-(_~nTb*kp-t+biJfr1>ve22~QGX9N}p4>lpVGOtE zOD2ClF!`8>-X%#V&WLx#&%wSmuI~};ZYUKD(^+d8;66r33gQ7qDTs8wL;!x``xo#X z1tR`)1Tu*_x)PD@I+W~m9qQq9Bv?m?SWlB_P1f6FeRYKCuD_0f!wW=?&Jj(-{mD88 zTUe5W00^On{$cb|8GVE+j7R9l6b3L$-_->~v4TOQsLUK$NZb#b*ocpj)Ppp6j8iQ` gWI2JyRKpX}2S_tX=NO%R6faFYM7k|}z&iwg0h-pCZ2$lO diff --git a/app/build.gradle b/app/build.gradle index 3522e9d..0d2abf0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,7 +8,7 @@ android { applicationId "com.bluealeaf.dota2ticker" minSdkVersion 15 targetSdkVersion 21 - versionCode 1 + versionCode 2 versionName "1.0" } buildTypes { diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index b2bcb68..38f3f2e 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,13 +15,125 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} +##---------------Begin: proguard configuration common for all Android apps ---------- +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontskipnonpubliclibraryclassmembers +-dontpreverify +-verbose +-dump class_files.txt +-printseeds seeds.txt +-printusage unused.txt +-printmapping mapping.txt +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* +-allowaccessmodification +-keepattributes *Annotation* +-renamesourcefileattribute SourceFile +-keepattributes SourceFile,LineNumberTable +-repackageclasses '' + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService +-dontnote com.android.vending.licensing.ILicensingService + +# Explicitly preserve all serialization members. The Serializable interface +# is only a marker interface, so it wouldn't save them. +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +# Preserve all native method names and the names of their classes. +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembernames class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembernames class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +# Preserve static fields of inner classes of R classes that might be accessed +# through introspection. +-keepclassmembers class **.R$* { + public static ; +} + +# Preserve the special static methods that are required in all enumeration classes. +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep public class * { + public protected *; +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} +##---------------End: proguard configuration common for all Android apps ---------- + +##---------------Begin: proguard configuration for Gson ---------- +# Gson uses generic type information stored in a class file when working with fields. Proguard +# removes such information by default, so configure it to keep all of it. +-keepattributes Signature + +# For using GSON @Expose annotation +-keepattributes *Annotation* + +# Gson specific classes +-keep class sun.misc.Unsafe { *; } +#-keep class com.google.gson.stream.** { *; } + +# Application classes that will be serialized/deserialized over Gson +-keep class com.bluealeaf.dota2ticker.models.** { *; } + +##---------------End: proguard configuration for Gson ---------- + + +##---------------Begin: proguard configuration for GreenDAO ---------- -keepclassmembers class * extends de.greenrobot.dao.AbstractDao { public static java.lang.String TABLENAME; } +##---------------End: proguard configuration for GreenDAO ---------- + + -keep class **$Properties --dontwarn com.squareup.** --dontwarn okio.** + +-keep class org.apache.http.** { *; } +-keep class retrofit.** { *; } +-keep class okio.** { *; } +-keep class org.joda.time.** { *; } +-keep class com.squareup.okhttp.** { *; } +-keep class com.bluealeaf.dota2ticker.models.** { *; } +-keepclassmembers class ** { + @com.squareup.otto.Subscribe public *; + @com.squareup.otto.Produce public *; +} +-keepclasseswithmembers class * { + @retrofit.http.* ; +} + +-keepattributes Exception + -dontwarn retrofit.** -dontwarn org.joda.time.** +-dontwarn okio.** +-dontwarn com.squareup.** diff --git a/app/src/main/java/com/bluealeaf/dota2ticker/async/RestClient.java b/app/src/main/java/com/bluealeaf/dota2ticker/async/RestClient.java index 3477167..43531fc 100644 --- a/app/src/main/java/com/bluealeaf/dota2ticker/async/RestClient.java +++ b/app/src/main/java/com/bluealeaf/dota2ticker/async/RestClient.java @@ -33,7 +33,7 @@ public static void getMatchesList(long id){ RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(Endpoints.GET_MATCHES_ENDPOINT) - .setLogLevel(RestAdapter.LogLevel.NONE) + .setLogLevel(RestAdapter.LogLevel.FULL) .setConverter(new GsonConverter(gson)) .setClient(new OkClient(BusProvider.getClientInstance())) .build();