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:
parent
1ce56ce92c
commit
41f8462ffe
3 changed files with 14 additions and 3 deletions
|
|
@ -10,13 +10,15 @@ android {
|
|||
applicationId "com.lpw.graypause"
|
||||
minSdk 33
|
||||
targetSdk 36
|
||||
versionCode 5
|
||||
versionName "1.4"
|
||||
versionCode 6
|
||||
versionName "1.5"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
8
app/proguard-rules.pro
vendored
Normal file
8
app/proguard-rules.pro
vendored
Normal 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.**
|
||||
Loading…
Reference in a new issue