2018-08-16 04:46:37 +10:00
|
|
|
# GENERAL OPTIONS
|
|
|
|
|
|
|
|
# turn on all optimizations except those that are known to cause problems on Android
|
|
|
|
-optimizations !code/simplification/cast,!field/*,!class/merging/*
|
|
|
|
-optimizationpasses 6
|
|
|
|
-allowaccessmodification
|
|
|
|
-dontpreverify
|
|
|
|
|
|
|
|
-dontusemixedcaseclassnames
|
|
|
|
-dontskipnonpubliclibraryclasses
|
|
|
|
-keepattributes *Annotation*
|
|
|
|
|
|
|
|
# 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.**
|
|
|
|
|
|
|
|
|
|
|
|
# TUSKY SPECIFIC OPTIONS
|
2017-04-08 08:08:51 +10:00
|
|
|
|
|
|
|
## for okhttp
|
2018-12-18 02:00:53 +11:00
|
|
|
-dontwarn javax.annotation.**
|
|
|
|
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
|
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
|
|
|
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
2017-04-08 08:08:51 +10:00
|
|
|
|
2017-08-12 03:19:35 +10:00
|
|
|
##for keep
|
|
|
|
-dontwarn android.arch.util.paging.CountedDataSource
|
|
|
|
-dontwarn android.arch.persistence.room.paging.LimitOffsetDataSource
|
|
|
|
|
2017-04-08 08:08:51 +10:00
|
|
|
## for retrofit
|
|
|
|
-dontwarn retrofit2.**
|
|
|
|
-keep class retrofit2.** { *; }
|
|
|
|
-keepattributes Signature
|
|
|
|
-keepattributes Exceptions
|
|
|
|
-keepattributes *Annotation*
|
|
|
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
@retrofit2.http.* <methods>;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keep class com.keylesspalace.tusky.entity.** { *; }
|
|
|
|
|
|
|
|
-keep public enum com.keylesspalace.tusky.entity.*$** {
|
|
|
|
**[] $VALUES;
|
|
|
|
public *;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# preserve line numbers for crash reporting
|
|
|
|
-keepattributes SourceFile,LineNumberTable
|
2018-08-16 04:46:37 +10:00
|
|
|
-renamesourcefileattribute SourceFile
|
2017-04-08 08:08:51 +10:00
|
|
|
|
|
|
|
# remove all logging from production apk
|
2017-08-12 03:19:35 +10:00
|
|
|
-assumenosideeffects class android.util.Log {
|
|
|
|
public static *** getStackTraceString(...);
|
|
|
|
public static *** d(...);
|
|
|
|
public static *** w(...);
|
|
|
|
public static *** v(...);
|
|
|
|
public static *** i(...);
|
|
|
|
}
|
2018-03-02 05:01:44 +11:00
|
|
|
|
|
|
|
# remove some kotlin overhead
|
|
|
|
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
|
|
|
|
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
|
2018-12-18 09:15:31 +11:00
|
|
|
static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
|
|
|
|
static void throwUninitializedPropertyAccessException(java.lang.String);
|
2018-03-02 05:01:44 +11:00
|
|
|
}
|
2018-03-28 04:47:00 +11:00
|
|
|
|
2018-08-16 04:46:37 +10:00
|
|
|
-dontwarn com.google.errorprone.annotations.*
|
2019-01-16 06:53:38 +11:00
|
|
|
|
|
|
|
# work around a bug in proguard
|
|
|
|
# see https://sourceforge.net/p/proguard/bugs/729/
|
|
|
|
-keepnames public interface com.uber.autodispose.lifecycle.CorrespondingEventsFunction { *; }
|
2019-04-17 05:39:12 +10:00
|
|
|
|
|
|
|
# Glide
|
|
|
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
|
|
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
|
|
|
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
|
|
**[] $VALUES;
|
|
|
|
public *;
|
|
|
|
}
|