forked from avluis/Hentoid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Navigation Drawer sticks when swiped
Fix: Download Activity can loose its title Improve: Additional safety checks on onSaveInstanceState for Import Activity's permissions check Added: Working proguard configuration and required files (proguard is currently off) Modified: Reduced versionCode now that rigorous testing is complete
- Loading branch information
Showing
26 changed files
with
471 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## GreenRobot EventBus specific rules ## | ||
# https://github.com/greenrobot/EventBus/blob/master/HOWTO.md#proguard-configuration | ||
|
||
-keepclassmembers class ** { | ||
public void onEvent*(***); | ||
} | ||
|
||
# Only required if you use AsyncExecutor | ||
-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent { | ||
public <init>(java.lang.Throwable); | ||
} | ||
|
||
# Don't warn for missing support classes | ||
-dontwarn de.greenrobot.event.util.*$Support | ||
-dontwarn de.greenrobot.event.util.*$SupportManagerFragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Glide specific rules # | ||
# https://github.com/bumptech/glide | ||
|
||
-keep public class * implements com.bumptech.glide.module.GlideModule | ||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { | ||
**[] $VALUES; | ||
public *; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Google Analytics 3.0 specific rules ## | ||
|
||
-keep class com.google.analytics.** { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Google Play Services 4.3.23 specific rules ## | ||
## https://developer.android.com/google/play-services/setup.html#Proguard ## | ||
|
||
-keep class * extends java.util.ListResourceBundle { | ||
protected Object[][] getContents(); | ||
} | ||
|
||
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { | ||
public static final *** NULL; | ||
} | ||
|
||
-keepnames @com.google.android.gms.common.annotation.KeepName class * | ||
-keepclassmembernames class * { | ||
@com.google.android.gms.common.annotation.KeepName *; | ||
} | ||
|
||
-keepnames class * implements android.os.Parcelable { | ||
public static final ** CREATOR; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## GSON 2.2.4 specific rules ## | ||
|
||
# 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* | ||
|
||
-keepattributes EnclosingMethod | ||
|
||
# Gson specific classes | ||
-keep class sun.misc.Unsafe { *; } | ||
-keep class com.google.gson.stream.** { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-keeppackagenames org.jsoup.nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# RxJava 0.21 | ||
|
||
-keep class rx.schedulers.Schedulers { | ||
public static <methods>; | ||
} | ||
-keep class rx.schedulers.ImmediateScheduler { | ||
public <methods>; | ||
} | ||
-keep class rx.schedulers.TestScheduler { | ||
public <methods>; | ||
} | ||
-keep class rx.schedulers.Schedulers { | ||
public static ** test(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-keep class org.sqlite.** { *; } | ||
-keep class org.sqlite.database.** { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# OkHttp | ||
-keepattributes Signature | ||
-keepattributes *Annotation* | ||
-keep class okhttp3.** { *; } | ||
-keep interface okhttp3.** { *; } | ||
-dontwarn okhttp3.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Okio | ||
-keep class sun.misc.Unsafe { *; } | ||
-dontwarn java.nio.file.* | ||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement | ||
-dontwarn okio.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-dontwarn android.support.design.** | ||
-keep class android.support.design.** { *; } | ||
-keep interface android.support.design.** { *; } | ||
-keep public class android.support.design.R$* { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-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 <init>(android.content.Context); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# http://stackoverflow.com/questions/29679177/cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard/29698051 | ||
-keep class android.support.v7.widget.RoundRectDrawable { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# This is a configuration file for ProGuard. | ||
# http://proguard.sourceforge.net/index.html#manual/usage.html | ||
|
||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-verbose | ||
|
||
# Optimization is turned off by default. Dex does not like code run | ||
# through the ProGuard optimize and preverify steps (and performs some | ||
# of these optimizations on its own). | ||
-dontoptimize | ||
-dontpreverify | ||
# Note that if you want to enable optimization, you cannot just | ||
# include optimization flags in your own project configuration file; | ||
# instead you will need to point to the | ||
# "proguard-android-optimize.txt" file instead of this one from your | ||
# project.properties file. | ||
|
||
-keepattributes *Annotation* | ||
-keep public class com.google.vending.licensing.ILicensingService | ||
-keep public class com.android.vending.licensing.ILicensingService | ||
|
||
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native | ||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
# keep setters in Views so that animations can still work. | ||
# see http://proguard.sourceforge.net/manual/examples.html#beans | ||
-keepclassmembers public class * extends android.view.View { | ||
void set*(***); | ||
*** get*(); | ||
} | ||
|
||
# We want to keep methods in Activity that could be used in the XML attribute onClick | ||
-keepclassmembers class * extends android.app.Activity { | ||
public void *(android.view.View); | ||
} | ||
|
||
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
-keepclassmembers class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable$Creator CREATOR; | ||
} | ||
|
||
-keepclassmembers class **.R$* { | ||
public static <fields>; | ||
} | ||
|
||
# The support library contains references to newer platform versions. | ||
# Don't warn about those in case this app is linking against an older | ||
# platform version. We know about them, and they are safe. | ||
-dontwarn android.support.** | ||
|
||
# Understand the @Keep support annotation. | ||
-keep class android.support.annotation.Keep | ||
|
||
-keep @android.support.annotation.Keep class * {*;} | ||
|
||
-keepclasseswithmembers class * { | ||
@android.support.annotation.Keep <methods>; | ||
} | ||
|
||
-keepclasseswithmembers class * { | ||
@android.support.annotation.Keep <fields>; | ||
} | ||
|
||
-keepclasseswithmembers class * { | ||
@android.support.annotation.Keep <init>(...); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# The simpliest strategy is to not run proguard against your project's own code. | ||
# This doesn't provide the benefits of optimization & obfuscation against your | ||
# project, but will still strip the libraries. The advantage is that your app will | ||
# work without any subsequent effort. If you choose this strategy, the proguard | ||
# configuration for the project is simply the line below. | ||
|
||
#-keep class com.yourpackage.app.** { *; } | ||
|
||
# The more involved strategy is to specifically provide rules to keep portions of your | ||
# app's codebase unmodified while allowing proguard to optimize the rest. | ||
|
||
# The first decision is whether or not you want to obfuscate your code. This provides no | ||
# performance benefit but makes it harder for other people to read your source code. | ||
# Unfortunately obfuscation can cause issues for code that uses reflection or a few other | ||
# techniques. The default is to obfuscate. | ||
|
||
-dontobfuscate | ||
|
||
# Additionally you will need to keep specific classes. A common use case is keeping all | ||
# of the models that are JSON parsed using something like Jackson. | ||
|
||
#-keep class com.yourpackage.app.model.User { *; } | ||
|
||
-ignorewarnings | ||
-optimizationpasses 5 | ||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-dontpreverify | ||
-verbose | ||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | ||
|
||
-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 * implements java.io.Serializable | ||
-keep public class * extends android.support.v4.app.Fragment | ||
-keep public class * extends android.support.v4.app.ListFragment | ||
-keep public class * extends android.view.View { | ||
public <init>(android.content.Context); | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
public <init>(android.content.Context, android.util.AttributeSet, int); | ||
} | ||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
-keepclasseswithmembers class * { | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
} | ||
-keepclasseswithmembers class * { | ||
public <init>(android.content.Context, android.util.AttributeSet, int); | ||
} | ||
-keepclassmembers class * extends android.app.Activity { | ||
public void *(android.view.View); | ||
} | ||
-keepclassmembers class * extends android.content.Context { | ||
public void *(android.view.View); | ||
public void *(android.view.MenuItem); | ||
} | ||
-keepclassmembers enum me.devsaki.hentoid.** { *; } | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
-keep class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable$Creator *; | ||
} | ||
-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 * { | ||
@android.webkit.JavascriptInterface <methods>; | ||
} | ||
|
||
-keepattributes JavascriptInterface | ||
-keepattributes InnerClasses | ||
-keepattributes EnclosingMethod | ||
|
||
-keep public class me.devsaki.hentoid.activities.HitomiActivity$PageLoadListener | ||
-keep public class * implements me.devsaki.hentoid.activities.HitomiActivity$PageLoadListener | ||
-keepclassmembers class me.devsaki.hentoid.activities.HitomiActivity$PageLoadListener { | ||
<methods>; | ||
} | ||
|
||
-keep public class me.devsaki.hentoid.activities.TsuminoActivity$PageLoadListener | ||
-keep public class * implements me.devsaki.hentoid.activities.TsuminoActivity$PageLoadListener | ||
-keepclassmembers class me.devsaki.hentoid.activities.TsuminoActivity$PageLoadListener { | ||
<methods>; | ||
} | ||
|
||
-keep class com.github.paolorotolo.** {*;} | ||
|
||
#-keep class com.afollestad.materialdialogs.** {*;} | ||
|
||
#-keep class me.zhanghai.android.** {*;} | ||
|
||
#-keep class com.turhanoz.android.** {*;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Proguard rules run against the test module (split since Gradle plugin v 1.1.0) | ||
-dontobfuscate | ||
-ignorewarnings | ||
|
||
# Specific classes that common test libs warn about | ||
-dontwarn java.beans.** | ||
-dontwarn javax.lang.model.element.Modifier | ||
-dontwarn org.apache.tools.ant.** | ||
-dontwarn org.assertj.core.internal.cglib.asm.util.TraceClassVisitor | ||
-dontwarn org.easymock.** | ||
-dontwarn org.jmock.core.** | ||
-dontwarn org.w3c.dom.bootstrap.** | ||
-dontwarn sun.misc.Unsafe | ||
-dontwarn sun.reflect.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.