♻️ refactor(proguard-rules): remove unused code, optimize string constants, enhance code optimization

This commit is contained in:
sankalp committed 2025-07-03 23:54:43 +05:45
1 parent 7549917891
commit 342222e77a
2 files changed
+32 -2

No files matched your search

+32 -2
View File
@@ -29,6 +29,7 @@
# Remove unused code aggressively
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static *** d(...);
public static *** v(...);
public static *** i(...);
@@ -36,10 +37,39 @@
public static *** e(...);
}
# Additional debug code removal
-assumenosideeffects class java.lang.System {
public static void out.println(...);
public static void err.println(...);
}
# Enhanced code optimization
-optimizations !code/simplification/string
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
# More aggressive class merging and inlining
-allowaccessmodification
-flattenpackagehierarchy
# Remove more unused code
-assumenosideeffects class * {
@android.support.annotation.Keep *;
}
# Keep only essential classes
-keep class io.github.sankalp.lunox.LauncherActivity { *; }
-keep class io.github.sankalp.lunox.** { *; }
# Remove debug information
# Remove debug information but keep essential attributes for crash reports
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keepattributes SourceFile,LineNumberTable,*Annotation*
# Remove unused resources more aggressively
-keepclassmembers class **.R$* {
public static <fields>;
}
# Optimize string constants
-optimizations !code/simplification/string,!field/*,!class/merging/*
Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB