summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-11-21 04:50:03 -0500
committerGitHub <noreply@github.com>2021-11-21 04:50:03 -0500
commit05ecff199f553e705e2a32c213a1de2a590dac2d (patch)
treea45d4780459df846e6284df297c0c4cd8e0e8a03
parent138847f98e137a20d7ad7b134d00be8899a23a76 (diff)
parentd3a23fe5c28fb2eb9a3c4e3847ea0e14152d277d (diff)
Merge pull request #10232 from JosJuice/android-minify
Android: Enable R8 code shrinking
-rw-r--r--Source/Android/app/build.gradle6
-rw-r--r--Source/Android/app/proguard-rules.pro20
2 files changed, 9 insertions, 17 deletions
diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle
index 9aca6bf771..ffb7aa55bb 100644
--- a/Source/Android/app/build.gradle
+++ b/Source/Android/app/build.gradle
@@ -49,6 +49,12 @@ android {
// Signed by release key, allowing for upload to Play Store.
release {
signingConfig signingConfigs.release
+
+ minifyEnabled true
+ shrinkResources true
+ proguardFiles getDefaultProguardFile(
+ 'proguard-android-optimize.txt'),
+ 'proguard-rules.pro'
}
// Signed by debug key disallowing distribution on Play Store.
diff --git a/Source/Android/app/proguard-rules.pro b/Source/Android/app/proguard-rules.pro
index 52592ad511..985cc25961 100644
--- a/Source/Android/app/proguard-rules.pro
+++ b/Source/Android/app/proguard-rules.pro
@@ -1,17 +1,3 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /home/sigma/apps/android-sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
+# Being able to get sensible stack traces from users is more important
+# than the space savings obfuscation could give us
+-dontobfuscate