[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/19956: Add telemetry...
[gecko.git] / mobile / android / fenix / app / proguard-android-optimize-3.5.0-modified.txt
blob0a64ad38a1d368f7d121776f86fd0e442f44b26e
1 ####################################################################################################
2 # Copy of `proguard-android-optimize.txt`.
3 # We need to _remove_ some of the configuration, so the only way to achieve that is to dump it here
4 # and modify it.
5 ####################################################################################################
7 # This is a configuration file for ProGuard.
8 # http://proguard.sourceforge.net/index.html#manual/usage.html
10 # Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with
11 # the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and
12 # will be ignored by new version of the Android plugin for Gradle.
14 # Optimizations: If you don't want to optimize, use the proguard-android.txt configuration file
15 # instead of this one, which turns off the optimization flags.
16 # Adding optimization introduces certain risks, since for example not all optimizations performed by
17 # ProGuard works on all versions of Dalvik.  The following flags turn off various optimizations
18 # known to have issues, but the list may not be complete or up to date. (The "arithmetic"
19 # optimization can be used if you are only targeting Android 2.0 or later.)  Make sure you test
20 # thoroughly if you go this route.
21 -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
22 -optimizationpasses 5
24 -dontusemixedcaseclassnames
25 -dontskipnonpubliclibraryclasses
26 -verbose
28 # Preserve some attributes that may be required for reflection.
29 -keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
31 -keep public class com.google.vending.licensing.ILicensingService
32 -keep public class com.android.vending.licensing.ILicensingService
33 -keep public class com.google.android.vending.licensing.ILicensingService
34 -dontnote com.android.vending.licensing.ILicensingService
35 -dontnote com.google.vending.licensing.ILicensingService
36 -dontnote com.google.android.vending.licensing.ILicensingService
38 # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
39 -keepclasseswithmembernames class * {
40     native <methods>;
43 # Keep setters in Views so that animations can still work.
44 -keepclassmembers public class * extends android.view.View {
45     void set*(***);
46     *** get*();
49 # We want to keep methods in Activity that could be used in the XML attribute onClick.
50 -keepclassmembers class * extends android.app.Activity {
51     public void *(android.view.View);
54 # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
55 -keepclassmembers enum * {
56     public static **[] values();
57     public static ** valueOf(java.lang.String);
60 -keepclassmembers class * implements android.os.Parcelable {
61     public static final ** CREATOR;
64 -keepclassmembers class **.R$* {
65     public static <fields>;
68 # Preserve annotated Javascript interface methods.
69 -keepclassmembers class * {
70     @android.webkit.JavascriptInterface <methods>;
73 # The support libraries contains references to newer platform versions.
74 # Don't warn about those in case this app is linking against an older
75 # platform version. We know about them, and they are safe.
76 -dontnote android.support.**
77 -dontnote androidx.**
78 -dontwarn android.support.**
79 -dontwarn androidx.**
81 # This class is deprecated, but remains for backward compatibility.
82 -dontwarn android.util.FloatMath
84 # Understand the @Keep support annotation.
85 -keep class android.support.annotation.Keep
86 -keep class androidx.annotation.Keep
88 -keep @android.support.annotation.Keep class * {*;}
89 -keep @androidx.annotation.Keep class * {*;}
91 -keepclasseswithmembers class * {
92     @android.support.annotation.Keep <methods>;
95 -keepclasseswithmembers class * {
96     @androidx.annotation.Keep <methods>;
99 -keepclasseswithmembers class * {
100     @android.support.annotation.Keep <fields>;
103 -keepclasseswithmembers class * {
104     @androidx.annotation.Keep <fields>;
107 -keepclasseswithmembers class * {
108     @android.support.annotation.Keep <init>(...);
111 -keepclasseswithmembers class * {
112     @androidx.annotation.Keep <init>(...);
115 # These classes are duplicated between android.jar and org.apache.http.legacy.jar.
116 -dontnote org.apache.http.**
117 -dontnote android.net.http.**
119 # These classes are duplicated between android.jar and core-lambda-stubs.jar.
120 -dontnote java.lang.invoke.**