added proguard.

This commit is contained in:
Kosh 2017-02-24 22:53:06 +08:00
parent 9e2eb0c01d
commit 520ad8d62a
4 changed files with 85 additions and 28 deletions

2
.gitignore vendored
View File

@ -12,4 +12,4 @@
/app/build/
/app/src/main/res/values/secrets.xml
/app/src/productionApp/
/app/StyleMe
/app/fastaccess-key

View File

@ -9,7 +9,7 @@ android {
signing {
keyAlias ANDROID_KEY_ALIAS
keyPassword ANDROID_STORE_PASSWORD
storeFile file('StyleMe')
storeFile file('fastaccess-key')
storePassword ANDROID_STORE_PASSWORD
}
}

107
app/proguard-rules.pro vendored
View File

@ -1,25 +1,82 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/Kosh/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include getPath 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:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*,Signature
-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();
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep public class * implements butterknife.Unbinder { public <init>(**, android.view.View); }
-keep class butterknife.*
-keepclasseswithmembernames class * { @butterknife.* <methods>; }
-keepclasseswithmembernames class * { @butterknife.* <fields>; }
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-dontwarn sun.misc.Unsafe
-dontwarn com.octo.android.robospice.retrofit.RetrofitJackson**
-dontwarn retrofit.appengine.UrlFetchClient
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
-keep class org.apache.http.** { *; }
-keep class org.apache.james.mime4j.** { *; }
-keep class javax.inject.** { *; }
-keep class retrofit.** { *; }
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn java.beans.**
-dontwarn javax.**
-dontwarn lombok.**
-dontwarn java.lang.invoke.*
-dontwarn rx.**
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**
-dontwarn org.apache.http.**
-dontwarn android.net.http.AndroidHttpClient
-dontwarn retrofit.**
-dontwarn retrofit2.adapter.rxjava.CompletableHelper$**
-dontwarn retrofit2.Platform$Java8
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
long producerNode;
long consumerNode;
}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclassmembers enum * { *; }
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-dontwarn icepick.**
-keep class **$$Icepick { *; }
-keepclasseswithmembernames class * {
@icepick.* <fields>;
}
-keep class com.fastaccess.data.dao.** { *; }
-keepclassmembers class com.prettifier.pretty.callback.MarkDownInterceptorInterface {
public *;
}
#-keep class com.siimkinks.sqlitemagic.** {*;}

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string> <!-- testing key ;) -->
</resources>