xref: /expo/android/app/proguard-rules.pro (revision 0502d1f9)
1# Add project specific ProGuard rules here.
2# By default, the flags in this file are appended to flags specified
3# in /Users/ide/Library/Android/sdk/tools/proguard/proguard-android.txt
4# You can edit the include path and order by changing the proguardFiles
5# directive in build.gradle.
6#
7# For more details, see
8#   http://developer.android.com/guide/developing/tools/proguard.html
9
10# Add any project specific keep options here:
11
12# If your project uses WebView with JS, uncomment the following
13# and specify the fully qualified class name to the JavaScript interface
14# class:
15#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16#   public *;
17#}
18
19
20# THIS IS VERY VERY BAD. REMOVE AS SOON AS VERSIONING IS FIXED
21-dontwarn **
22
23
24-dontnote **
25
26-keep class host.exp.exponent.generated.AppConstants { *; }
27
28##### Crashlytics #####
29-keepattributes SourceFile,LineNumberTable
30
31##### Expo Universal Modules #####
32
33-keepclassmembers class * {
34  @**.expo.core.interfaces.ExpoProp *;
35}
36-keepclassmembers class * {
37  @**.expo.core.interfaces.ExpoMethod *;
38}
39
40-keep @**.expo.core.interfaces.DoNotStrip class *
41-keepclassmembers class * {
42  @**.expo.core.interfaces.DoNotStrip *;
43}
44
45##### React Native #####
46-keep,allowobfuscation @interface **.facebook.proguard.annotations.DoNotStrip
47-keep,allowobfuscation @interface **.facebook.proguard.annotations.KeepGettersAndSetters
48-keep,allowobfuscation @interface **.facebook.react.bridge.ReadableType
49
50# Do not strip any method/class that is annotated with @DoNotStrip
51-keep @**.facebook.proguard.annotations.DoNotStrip class *
52-keepclassmembers class * {
53  @**.facebook.proguard.annotations.DoNotStrip *;
54}
55
56-keepclassmembers @**.facebook.proguard.annotations.KeepGettersAndSetters class * {
57  void set*(***);
58  *** get*();
59}
60
61-keep class * extends **.facebook.react.bridge.JavaScriptModule { *; }
62-keep class * extends **.facebook.react.bridge.NativeModule { *; }
63-keepclassmembers class *  { @**.facebook.react.uimanager.UIProp <fields>; }
64-keepclassmembers class *  { @**.facebook.react.uimanager.ReactProp <methods>; }
65-keepclassmembers class *  { @**.facebook.react.uimanager.ReactPropGroup <methods>; }
66
67# TODO: shouldn't need these two rules
68-keep interface **.facebook.react.bridge.** { *; }
69-keep enum **.facebook.react.bridge.** { *; }
70
71##### Versioned React Native #####
72-keep class **.facebook.** { *; }
73-keep class abi** { *; }
74-keep class versioned** { *; }
75-keep class expo.modules** { *; }
76
77##### Butterknife #####
78-keep class butterknife.** { *; }
79-dontwarn butterknife.internal.**
80-keep class **$$ViewBinder { *; }
81
82-keepclasseswithmembernames class * {
83    @butterknife.* <fields>;
84}
85
86-keepclasseswithmembernames class * {
87    @butterknife.* <methods>;
88}
89
90##### Stetho #####
91-keep class **.facebook.stetho.** { *; }
92-dontwarn **.facebook.stetho.**
93
94##### fresco #####
95# Keep our interfaces so they can be used by other ProGuard rules.
96# See http://sourceforge.net/p/proguard/bugs/466/
97-keep,allowobfuscation @interface **.facebook.common.internal.DoNotStrip
98
99# Do not strip any method/class that is annotated with @DoNotStrip
100-keep @**.facebook.common.internal.DoNotStrip class *
101-keepclassmembers class * {
102    @**.facebook.common.internal.DoNotStrip *;
103}
104
105# Keep native methods
106-keepclassmembers class * {
107    native <methods>;
108}
109
110-dontwarn okio.**
111-dontwarn javax.annotation.**
112-dontwarn com.android.volley.toolbox.**
113
114##### okhttp #####
115-keepattributes Signature
116-keepattributes *Annotation*
117-keep class com.squareup.okhttp.** { *; }
118-keep interface com.squareup.okhttp.** { *; }
119# This is also needed by Picasso
120-dontwarn com.squareup.okhttp.**
121
122-keep class okhttp3.** { *; }
123-keep interface okhttp3.** { *; }
124# This is also needed by Picasso
125-dontwarn okhttp3.**
126
127##### okio #####
128-keep class sun.misc.Unsafe { *; }
129-dontwarn java.nio.file.*
130-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
131-dontwarn okio.**
132
133##### EventBus #####
134-keepclassmembers class ** {
135    public void onEvent*(***);
136}
137
138# Only required if you use AsyncExecutor
139-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
140    <init>(java.lang.Throwable);
141}
142
143##### DBFlow #####
144-keep class com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder
145
146##### Segment #####
147-keep class com.segment.analytics.** { *; }
148-keep class androidx.lifecycle.DefaultLifecycleObserver
149
150##### skia #####
151-keep class com.shopify.reactnative.skia.** { *; }
152
153##### svg #####
154-keep public class com.horcrux.svg.** { *; }
155