Tusky-App-Android/app/proguard-rules.pro

72 lines
2.3 KiB
Prolog
Raw Normal View History

# 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 {
2020-06-04 20:17:07 +02:00
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 {
2020-06-04 20:17:07 +02:00
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 {
2020-06-04 20:17:07 +02:00
public static final ** CREATOR;
}
# TUSKY SPECIFIC OPTIONS
2017-04-08 00:08:51 +02:00
2020-06-04 20:17:07 +02:00
# keep members of our model classes, they are used in json de/serialization
-keepclassmembers class com.keylesspalace.tusky.entity.* { *; }
2017-04-08 00:08:51 +02:00
-keep public enum com.keylesspalace.tusky.entity.*$** {
**[] $VALUES;
public *;
}
-keep enum com.keylesspalace.tusky.db.DraftAttachment$Type {
public *;
}
2017-04-08 00:08:51 +02:00
# preserve line numbers for crash reporting
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
2017-04-08 00:08:51 +02:00
# remove all logging from production apk
2017-08-11 19:19:35 +02:00
-assumenosideeffects class android.util.Log {
public static *** getStackTraceString(...);
public static *** d(...);
public static *** w(...);
public static *** v(...);
public static *** i(...);
}
-assumenosideeffects class java.lang.String {
public static java.lang.String format(...);
}
2018-03-01 19:01:44 +01:00
# remove some kotlin overhead
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
static void throwUninitializedPropertyAccessException(java.lang.String);
2018-03-01 19:01:44 +01:00
}