189 lines
6.3 KiB
Prolog
189 lines
6.3 KiB
Prolog
# Add project specific ProGuard rules here.
|
|
# You can control the set of applied configuration files using the
|
|
# proguardFiles setting in build.gradle.
|
|
#
|
|
# For more details, see
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
# 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
|
|
#-keepnames class com.path.to.your.ParcelableArg
|
|
#-keepnames class com.path.to.your.SerializableArg
|
|
#-keepnames class com.path.to.your.EnumArg
|
|
|
|
-dontwarn javax.lang.model.element.Modifier
|
|
|
|
# Note: We intentionally don't add the flags we'd need to make Enums work.
|
|
# That's because the Proguard configuration required to make it work on
|
|
# optimized code would preclude lots of optimization, like converting enums
|
|
# into ints.
|
|
|
|
# Throwables uses internal APIs for lazy stack trace resolution
|
|
-dontnote sun.misc.SharedSecrets
|
|
-keep class sun.misc.SharedSecrets {
|
|
*** getJavaLangAccess(...);
|
|
}
|
|
-dontnote sun.misc.JavaLangAccess
|
|
-keep class sun.misc.JavaLangAccess {
|
|
*** getStackTraceElement(...);
|
|
*** getStackTraceDepth(...);
|
|
}
|
|
|
|
# FinalizableReferenceQueue calls this reflectively
|
|
# Proguard is intelligent enough to spot the use of reflection onto this, so we
|
|
# only need to keep the names, and allow it to be stripped out if
|
|
# FinalizableReferenceQueue is unused.
|
|
-keepnames class com.google.common.base.internal.Finalizer {
|
|
*** startFinalizer(...);
|
|
}
|
|
# However, it cannot "spot" that this method needs to be kept IF the class is.
|
|
-keepclassmembers class com.google.common.base.internal.Finalizer {
|
|
*** startFinalizer(...);
|
|
}
|
|
-keepnames class com.google.common.base.FinalizableReference {
|
|
void finalizeReferent();
|
|
}
|
|
-keepclassmembers class com.google.common.base.FinalizableReference {
|
|
void finalizeReferent();
|
|
}
|
|
|
|
# Striped64, LittleEndianByteArray, UnsignedBytes, AbstractFuture
|
|
-dontwarn sun.misc.Unsafe
|
|
|
|
# Striped64 appears to make some assumptions about object layout that
|
|
# really might not be safe. This should be investigated.
|
|
-keepclassmembers class com.google.common.cache.Striped64 {
|
|
*** base;
|
|
*** busy;
|
|
}
|
|
-keepclassmembers class com.google.common.cache.Striped64$Cell {
|
|
<fields>;
|
|
}
|
|
|
|
-dontwarn java.lang.SafeVarargs
|
|
|
|
-keep class java.lang.Throwable {
|
|
*** addSuppressed(...);
|
|
}
|
|
|
|
# Futures.getChecked, in both of its variants, is incompatible with proguard.
|
|
|
|
# Used by AtomicReferenceFieldUpdater and sun.misc.Unsafe
|
|
-keepclassmembers class com.google.common.util.concurrent.AbstractFuture** {
|
|
*** waiters;
|
|
*** value;
|
|
*** listeners;
|
|
*** thread;
|
|
*** next;
|
|
}
|
|
-keepclassmembers class com.google.common.util.concurrent.AtomicDouble {
|
|
*** value;
|
|
}
|
|
-keepclassmembers class com.google.common.util.concurrent.AggregateFutureState {
|
|
*** remaining;
|
|
*** seenExceptions;
|
|
}
|
|
|
|
# Since Unsafe is using the field offsets of these inner classes, we don't want
|
|
# to have class merging or similar tricks applied to these classes and their
|
|
# fields. It's safe to allow obfuscation, since the by-name references are
|
|
# already preserved in the -keep statement above.
|
|
-keep,allowshrinking,allowobfuscation class com.google.common.util.concurrent.AbstractFuture** {
|
|
<fields>;
|
|
}
|
|
|
|
# Futures.getChecked (which often won't work with Proguard anyway) uses this. It
|
|
# has a fallback, but again, don't use Futures.getChecked on Android regardless.
|
|
-dontwarn java.lang.ClassValue
|
|
|
|
# MoreExecutors references AppEngine
|
|
-dontnote com.google.appengine.api.ThreadManager
|
|
-keep class com.google.appengine.api.ThreadManager {
|
|
static *** currentRequestThreadFactory(...);
|
|
}
|
|
-dontnote com.google.apphosting.api.ApiProxy
|
|
-keep class com.google.apphosting.api.ApiProxy {
|
|
static *** getCurrentEnvironment (...);
|
|
}
|
|
|
|
# For Jackson
|
|
-keepattributes *Annotation*,EnclosingMethod,Signature
|
|
-keepnames class com.fasterxml.jackson.** { *; }
|
|
-dontwarn com.fasterxml.jackson.databind.**
|
|
-keep class org.codehaus.** { *; }
|
|
-keepclassmembers public final enum org.codehaus.jackson.annotate.JsonAutoDetect$Visibility {
|
|
public static final org.codehaus.jackson.annotate.JsonAutoDetect$Visibility *; }
|
|
|
|
#okhttp
|
|
-dontwarn okhttp3.**
|
|
-keep class okhttp3.**{*;}
|
|
|
|
#okio
|
|
-dontwarn okio.**
|
|
-keep class okio.**{*;}
|
|
|
|
-keep class com.zane.smapiinstaller.** { *; }
|
|
-keep class pxb.android.** { *; }
|
|
-keep class net.fornwall.apksigner.** { *; }
|
|
-keep class com.android.apksig.** { *; }
|
|
|
|
#Warning:org.bouncycastle.jce.provider.X509LDAPCertStoreSpi: can't find referenced class javax.naming.NamingEnumeration
|
|
-dontwarn javax.naming.**
|
|
-keep class org.bouncycastle.jcajce.provider.** { *; }
|
|
-keep class org.bouncycastle.jce.provider.** { *; }
|
|
#-keep class org.bouncycastle.** {*;}
|
|
|
|
-keep class org.slf4j.**
|
|
-keep class com.hjq.language.** {*;}
|
|
-keep class net.jpountz.** {*;}
|
|
|
|
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
|
|
public static java.lang.String TABLENAME;
|
|
}
|
|
-keep class **$Properties { *; }
|
|
|
|
# If you DO use SQLCipher:
|
|
-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }
|
|
|
|
# If you do NOT use SQLCipher:
|
|
-dontwarn net.sqlcipher.database.**
|
|
# If you do NOT use RxJava:
|
|
-dontwarn rx.**
|
|
|
|
-keep class com.sun.org.apache.xml.internal.utils.PrefixResolver
|
|
-keep class java.rmi.Remote
|
|
-keep class java.rmi.server.*
|
|
-keep class javax.annotation.processing.AbstractProcessor
|
|
-keep class javax.el.*
|
|
-keep class javax.servlet.http.*
|
|
-keep class javax.servlet.jsp.el.VariableResolver
|
|
-keep class javax.servlet.jsp.*
|
|
-keep class javax.servlet.jsp.tagext.*
|
|
-keep class javax.servlet.*
|
|
-keep class javax.swing.JTree
|
|
-keep class javax.swing.tree.TreeNode
|
|
-keep class lombok.core.configuration.ConfigurationKey
|
|
-keep class org.apache.tools.ant.Task
|
|
-keep class org.apache.tools.ant.taskdefs.MatchingTask
|
|
-keep class org.apache.xml.utils.PrefixResolver
|
|
-keep class org.jaxen.dom.*
|
|
-keep class org.jaxen.dom4j.Dom4jXPath
|
|
-keep class org.jaxen.jdom.JDOMXPath
|
|
-keep class org.jaxen.*
|
|
-keep class org.jdom.output.XMLOutputter
|
|
-keep class org.python.core.PyObject
|
|
-keep class org.python.util.PythonInterpreter
|
|
-keep class org.zeroturnaround.javarebel.ClassEventListener
|