# 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 { ; } -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** { ; } # 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.** { *; } -keep class com.fansin.message.tool.core.BufferedRandomAccessFile { *; } #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.** -dontwarn com.sun.org.apache.xml.internal.utils.PrefixResolver -dontwarn java.rmi.Remote -dontwarn java.rmi.server.* -dontwarn javax.annotation.processing.AbstractProcessor -dontwarn javax.el.* -dontwarn javax.servlet.http.* -dontwarn javax.servlet.jsp.el.VariableResolver -dontwarn javax.servlet.jsp.* -dontwarn javax.servlet.jsp.tagext.* -dontwarn javax.servlet.* -dontwarn javax.swing.JTree -dontwarn javax.swing.tree.TreeNode -dontwarn lombok.core.configuration.ConfigurationKey -dontwarn org.apache.tools.ant.Task -dontwarn org.apache.tools.ant.taskdefs.MatchingTask -dontwarn org.apache.xml.utils.PrefixResolver -dontwarn org.jaxen.dom.* -dontwarn org.jaxen.dom4j.Dom4jXPath -dontwarn org.jaxen.jdom.JDOMXPath -dontwarn org.jaxen.* -dontwarn org.jdom.output.XMLOutputter -dontwarn org.python.core.PyObject -dontwarn org.python.util.PythonInterpreter -dontwarn org.zeroturnaround.javarebel.ClassEventListener