2019-02-13 17:35:12 +00:00
|
|
|
-dontobfuscate
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
# Sentry
|
|
|
|
####################################################################################################
|
|
|
|
|
|
|
|
# Recommended config via https://docs.sentry.io/clients/java/modules/android/#manual-integration
|
|
|
|
# Since we don't obfuscate, we don't need to use their Gradle plugin to upload ProGuard mappings.
|
|
|
|
-keepattributes LineNumberTable,SourceFile
|
|
|
|
-dontwarn org.slf4j.**
|
|
|
|
-dontwarn javax.**
|
|
|
|
|
|
|
|
# Our addition: this class is saved to disk via Serializable, which ProGuard doesn't like.
|
|
|
|
# If we exclude this, upload silently fails (Sentry swallows a NPE so we don't crash).
|
|
|
|
# I filed https://github.com/getsentry/sentry-java/issues/572
|
2018-12-07 20:11:50 +00:00
|
|
|
#
|
2019-02-13 17:35:12 +00:00
|
|
|
# If Sentry ever mysteriously stops working after we upgrade it, this could be why.
|
|
|
|
-keep class io.sentry.event.Event { *; }
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
# Android and GeckoView built-ins
|
|
|
|
####################################################################################################
|
2018-12-07 20:11:50 +00:00
|
|
|
|
2019-02-13 17:35:12 +00:00
|
|
|
-dontwarn android.**
|
|
|
|
-dontwarn androidx.**
|
|
|
|
-dontwarn com.google.**
|
|
|
|
-dontwarn org.mozilla.geckoview.**
|
2018-12-07 20:11:50 +00:00
|
|
|
|
2019-07-05 19:49:10 +00:00
|
|
|
# Raptor now writes a *-config.yaml file to specify Gecko runtime settings (e.g. the profile dir). This
|
|
|
|
# file gets deserialized into a DebugConfig object, which is why we need to keep this class
|
|
|
|
# and its members.
|
|
|
|
-keep class org.mozilla.gecko.util.DebugConfig { *; }
|
|
|
|
|
2019-08-21 16:18:57 +00:00
|
|
|
####################################################################################################
|
|
|
|
# Force removal of slow Dispatchers.Main ServiceLoader
|
|
|
|
####################################################################################################
|
2019-12-17 16:41:54 +00:00
|
|
|
# Allow R8 to optimize away the FastServiceLoader.
|
|
|
|
# Together with ServiceLoader optimization in R8
|
|
|
|
# this results in direct instantiation when loading Dispatchers.Main
|
|
|
|
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
|
|
|
|
boolean FAST_SERVICE_LOADER_ENABLED return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
-assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoader {
|
|
|
|
boolean ANDROID_DETECTED return true;
|
2019-08-21 16:18:57 +00:00
|
|
|
}
|
|
|
|
|
2019-02-28 15:52:06 +00:00
|
|
|
####################################################################################################
|
|
|
|
# Mozilla Application Services
|
|
|
|
####################################################################################################
|
|
|
|
|
2019-08-29 15:16:26 +00:00
|
|
|
-keep class mozilla.appservices.** { *; }
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
# ViewModels
|
|
|
|
####################################################################################################
|
|
|
|
|
|
|
|
-keep class org.mozilla.fenix.**ViewModel { *; }
|
2019-02-28 17:12:47 +00:00
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
# Adjust
|
|
|
|
####################################################################################################
|
|
|
|
|
|
|
|
-keep public class com.adjust.sdk.** { *; }
|
|
|
|
-keep class com.google.android.gms.common.ConnectionResult {
|
|
|
|
int SUCCESS;
|
|
|
|
}
|
|
|
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
|
|
|
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
|
|
|
}
|
|
|
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
|
|
|
java.lang.String getId();
|
|
|
|
boolean isLimitAdTrackingEnabled();
|
|
|
|
}
|
|
|
|
-keep public class com.android.installreferrer.** { *; }
|
|
|
|
-keep class dalvik.system.VMRuntime {
|
|
|
|
java.lang.String getRuntime();
|
|
|
|
}
|
|
|
|
-keep class android.os.Build {
|
|
|
|
java.lang.String[] SUPPORTED_ABIS;
|
|
|
|
java.lang.String CPU_ABI;
|
|
|
|
}
|
|
|
|
-keep class android.content.res.Configuration {
|
|
|
|
android.os.LocaledList getLocales();
|
|
|
|
java.util.Locale locale;
|
|
|
|
}
|
|
|
|
-keep class android.os.LocaleList {
|
|
|
|
java.util.Locale get(int);
|
|
|
|
}
|
2019-04-10 15:06:21 +00:00
|
|
|
|
|
|
|
# Keep code generated from Glean Metrics
|
2019-04-10 17:34:30 +00:00
|
|
|
-keep class org.mozilla.fenix.GleanMetrics.** { *; }
|
2019-04-10 15:06:21 +00:00
|
|
|
|
|
|
|
# Keep methods that are called by MotionLayout
|
2019-04-10 17:34:30 +00:00
|
|
|
-keep class org.mozilla.fenix.home.SearchView { *; }
|
2019-07-08 19:29:51 +00:00
|
|
|
|
|
|
|
# Keep motionlayout internal methods
|
|
|
|
# https://github.com/mozilla-mobile/fenix/issues/2094
|
|
|
|
-keep class androidx.constraintlayout.** { *; }
|
2019-10-29 17:09:07 +00:00
|
|
|
|
|
|
|
# Keep adjust relevant classes
|
|
|
|
-keep class com.adjust.sdk.** { *; }
|
|
|
|
-keep class com.google.android.gms.common.ConnectionResult {
|
|
|
|
int SUCCESS;
|
|
|
|
}
|
|
|
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
|
|
|
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
|
|
|
}
|
|
|
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
|
|
|
java.lang.String getId();
|
|
|
|
boolean isLimitAdTrackingEnabled();
|
|
|
|
}
|
2019-11-16 01:10:38 +00:00
|
|
|
-keep public class com.android.installreferrer.** { *; }
|
|
|
|
|
|
|
|
# Keep Android Lifecycle methods
|
|
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
|
|
|
|
-keep class androidx.lifecycle.** { *; }
|