1.5: shrink and optimize release builds with R8

Release APK goes from 115 KB to 47 KB. Shizuku.newProcess is kept explicitly
because ShizukuGrant reaches it by reflection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Loïc Wisniewski 2026-10-06 19:46:30 +02:00
commit 41f8462ffe
3 changed files with 14 additions and 3 deletions

8
app/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,8 @@
# ShizukuGrant calls this private method by reflection (Shizuku 13 hides it); R8 would
# otherwise rename or drop it and the "Grant with Shizuku" button would fail at runtime.
-keep class rikka.shizuku.Shizuku {
private static rikka.shizuku.ShizukuRemoteProcess newProcess(java.lang.String[], java.lang.String[], java.lang.String);
}
# Not shipped: compile-time annotations referenced by the Shizuku library.
-dontwarn androidx.annotation.**