aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/proguard-android-optimize.txt
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-29 10:50:47 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-29 10:52:54 +0530
commitb3bb7c694b55fd2c65970abf528a25a38239385e (patch)
tree5da353c6b79f41a4e280f4e7d5c0cfb6cb03fcc2 /ui/proguard-android-optimize.txt
parentglobal: hardcode tags so that minification doesn't ruin the log (diff)
downloadwireguard-android-b3bb7c694b55fd2c65970abf528a25a38239385e.tar.xz
wireguard-android-b3bb7c694b55fd2c65970abf528a25a38239385e.zip
build: Improve R8 rules and enable aggressive optimization modes
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/proguard-android-optimize.txt')
-rw-r--r--ui/proguard-android-optimize.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/ui/proguard-android-optimize.txt b/ui/proguard-android-optimize.txt
new file mode 100644
index 0000000..e2095ad
--- /dev/null
+++ b/ui/proguard-android-optimize.txt
@@ -0,0 +1,36 @@
+-allowaccessmodification
+-dontpreverify
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-verbose
+
+-keepattributes *Annotation*
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keepclassmembers class * implements android.os.Parcelable {
+ public static final ** CREATOR;
+}
+
+-keep class androidx.annotation.Keep
+
+-keep @androidx.annotation.Keep class * {*;}
+
+-keepclasseswithmembers class * {
+ @androidx.annotation.Keep <methods>;
+}
+
+-keepclasseswithmembers class * {
+ @androidx.annotation.Keep <fields>;
+}
+
+-keepclasseswithmembers class * {
+ @androidx.annotation.Keep <init>(...);
+}