]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
Make the APK and the install footprint smaller
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 2 Mar 2022 23:33:54 +0000 (23:33 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 5 Mar 2022 17:08:57 +0000 (17:08 +0000)
- Shrink resources at build time
- No WebView analytics database (4M on disk)
- pngcrush shield1.png

mobile/build.gradle
mobile/src/main/AndroidManifest.xml
mobile/src/main/res/drawable/shield1.png

index 1da5bcf112534d83c0c785187990d45ba8073f29..e62011bf03e2f937f30ffca5b9f6d26c8a07b9cf 100644 (file)
@@ -25,6 +25,7 @@ android {
     buildTypes {
         release {
             minifyEnabled true
+            shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
             buildConfigField "String", "gitDescription", "\"${makeGitDescription()}\""
         }
index 44ca6ef1787d8309a0bca9e25fa2faa06b15f5c4..14e795fb4fac28f70027ce023c63e922a9c612fd 100644 (file)
@@ -24,6 +24,9 @@
         android:theme="@style/AppTheme"
         tools:ignore="UnusedAttribute">
 
+        <!-- The metrics database is four megabytes; for that sin alone... -->
+        <meta-data android:name="android.webkit.WebView.MetricsOptOut" android:value="true" />
+
         <activity android:name=".activity.main.Activity"
             android:exported="true"
             android:showWhenLocked="true"
index da33ac3e1adb5dd9ae3bd5b877a29ae36d859ddb..68236dc85092785d42afb9ed93c15f3df6784124 100644 (file)
Binary files a/mobile/src/main/res/drawable/shield1.png and b/mobile/src/main/res/drawable/shield1.png differ