|
|
|
|
# GENERAL OPTIONS
|
|
|
|
|
|
|
|
|
|
-allowaccessmodification
|
|
|
|
|
|
|
|
|
|
# Preserve some attributes that may be required for reflection.
|
|
|
|
|
-keepattributes RuntimeVisible*Annotations, AnnotationDefault
|
|
|
|
|
|
|
|
|
|
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
|
|
|
|
|
-keepclasseswithmembernames class * {
|
|
|
|
|
native <methods>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
|
|
|
|
|
-keepclassmembers,allowoptimization enum * {
|
|
|
|
|
public static **[] values();
|
|
|
|
|
public static ** valueOf(java.lang.String);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-keepclassmembers class * implements android.os.Parcelable {
|
|
|
|
|
public static final ** CREATOR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# TUSKY SPECIFIC OPTIONS
|
|
|
|
|
|
|
|
|
|
# preserve line numbers for crash reporting
|
|
|
|
|
-keepattributes SourceFile,LineNumberTable
|
|
|
|
|
-renamesourcefileattribute SourceFile
|
|
|
|
|
|
|
|
|
|
# Bouncy Castle -- Keep EC
|
|
|
|
|
-keep class org.bouncycastle.jcajce.provider.asymmetric.EC$* { *; }
|
|
|
|
|
-keep class org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi$EC
|
|
|
|
|
|
|
|
|
|
# Preference fragments can be referenced by name, ensure they remain
|
|
|
|
|
# https://github.com/tuskyapp/Tusky/issues/3161
|
|
|
|
|
-keep class * extends androidx.preference.PreferenceFragmentCompat
|
|
|
|
|
|
|
|
|
|
# remove all logging from production apk
|
|
|
|
|
-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(...);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# remove some kotlin overhead
|
|
|
|
|
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
|
|
|
|
|
static void checkNotNull(java.lang.Object);
|
|
|
|
|
static void checkNotNull(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkNotNullParameter(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);
|
|
|
|
|
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
|
|
|
|
|
static void throwUninitializedProperty(java.lang.String);
|
|
|
|
|
static void throwUninitializedPropertyAccessException(java.lang.String);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# there is no need for edit mode in production builds, allow it to be pruned
|
|
|
|
|
-assumenosideeffects public class * extends android.view.View {
|
|
|
|
|
boolean isInEditMode();
|
|
|
|
|
}
|
|
|
|
|
-assumevalues public class * extends android.view.View {
|
|
|
|
|
boolean isInEditMode() return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-checkdiscard class com.keylesspalace.tusky.usecase.DeveloperToolsUseCase
|