From 52e24e742e8066eb7c9d8f224fbe9876b4c85b57 Mon Sep 17 00:00:00 2001 From: rushiiMachine <33725716+rushiiMachine@users.noreply.github.com> Date: Sun, 3 Mar 2024 21:08:25 -0800 Subject: [PATCH] feat: more release optimizations --- app/build.gradle.kts | 4 ++++ app/proguard-rules.pro | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6323ea3..b8940fb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -77,6 +77,10 @@ android { // okhttp3 is used by some lib (no cookies so publicsuffixes.gz can be dropped) excludes += "/okhttp3/**" } + jniLibs { + // x86 is dead + excludes += "/lib/x86/*.so" + } } compileOptions { diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 4c8cbd7..c96e796 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -28,12 +28,6 @@ # Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`. # If you have any, uncomment and replace classes with those containing named companion objects. -keepattributes InnerClasses # Needed for `getDeclaredClasses`. -#-if @kotlinx.serialization.Serializable class -#com.xinto.opencord.gateway.io.OpCode, # <-- List serializable classes with named companions. -#com.xinto.opencord.gateway.io.EventName -#{ -# static **$* *; -#} -keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept. static <1>$$serializer INSTANCE; } @@ -47,6 +41,10 @@ # Amount of optimization iterations, taken from an SO post -optimizationpasses 5 +-mergeinterfacesaggressively # Broaden access modifiers to increase results during optimization -allowaccessmodification + +# Suppress missing class warnings +-dontwarn org.slf4j.impl.StaticLoggerBinder