From 5c24869fa72f50f2311114a61283646759508dcd Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz <4012752+erdemyerebasmaz@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:24:01 +0300 Subject: [PATCH] Add proguard rules not to obfuscate & shrink necessary files on release mode --- android/app/build.gradle | 5 +++++ android/app/proguard-rules.pro | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 android/app/proguard-rules.pro diff --git a/android/app/build.gradle b/android/app/build.gradle index 30b6a098f..69c031441 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -108,6 +108,11 @@ android { signingConfig signingConfigs.debug resValue "string", "app_name", "Breez Cloud" resValue "string", "breezApiKey", envVariables.API_KEY + + proguardFiles( + getDefaultProguardFile("proguard-android.txt"), + "proguard-rules.pro" + ) } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 000000000..770f13d31 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,16 @@ + # Tinylog +-keepnames interface org.tinylog.** +-keepnames class * implements org.tinylog.** +-keepclassmembers class * implements org.tinylog.** { (...); } + +-dontwarn dalvik.system.VMStack +-dontwarn java.lang.** +-dontwarn javax.naming.** +-dontwarn sun.reflect.Reflection + +# JNA +-keep class com.sun.jna.** { *; } +-keep class * implements com.sun.jna.** { *; } + +# Other +-dontoptimize \ No newline at end of file