-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathproguard-rules.pro
More file actions
27 lines (22 loc) · 1.2 KB
/
Copy pathproguard-rules.pro
File metadata and controls
27 lines (22 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Keep Cordova classes
-keep class org.apache.cordova.** { *; }
# Cordova discovers plugins by class name from config.xml and instantiates them
# reflectively, and plugins can dispatch actions by method name through
# reflection too (e.g. Ftp.execute() uses
# getClass().getDeclaredMethod(action, JSONArray, CallbackContext)).
# Without keeping the members, R8 strips methods such as connect()/listDirectory()
# and those plugin calls fail at runtime with NoSuchMethodException.
-keep public class * extends org.apache.cordova.CordovaPlugin { *; }
# WebView JS bridge methods are invoked by name from JavaScript.
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
# cordova-plugin-buildinfo resolves the app's BuildConfig reflectively:
# Class.forName(packageName + ".BuildConfig") and c.getField(fieldName).
-keep class **.BuildConfig { *; }
# maverick-synergy (SSH/SFTP) references java.lang.management from
# Utils.generateThreadDump(), which does not exist on Android. That method is
# never reached on Android, so ignore the missing Java SE classes.
-dontwarn java.lang.management.**
# Keep Javascript Interface attributes
-keepattributes *Annotation*,EnclosingMethod,InnerClasses,Signature