♻️ refactor(proguard-rules): remove unused code, optimize string constants, enhance code optimization
This commit is contained in:
2 files changed
+32
-2
No files matched your search
Vendored
+32
-2
@@ -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 |
Reference in new issue
Block a user