mirror of
https://github.com/Darkrock-Studios/hammer-editor.git
synced 2026-10-18 09:43:55 +00:00
Keep ActionCallback constructors so widget taps work in release
Glance instantiates ActionCallback implementations reflectively, but its consumer rule only keeps the class, not its members. R8 stripped the no-arg constructor, so every widget tap threw NoSuchMethodException in minified builds.
This commit is contained in:
parent
893e29106d
commit
a6a17fb1e4
1 changed files with 8 additions and 1 deletions
9
android/proguard-rules.pro
vendored
9
android/proguard-rules.pro
vendored
|
|
@ -54,4 +54,11 @@
|
|||
-assumenosideeffects class org.slf4j.Logger {
|
||||
public void trace(...);
|
||||
public void debug(...);
|
||||
}
|
||||
}
|
||||
|
||||
# Glance instantiates ActionCallback implementations reflectively via their no-arg
|
||||
# constructor. Glance's own consumer rule keeps the class but not its members, so
|
||||
# R8 strips the constructor and every widget tap throws NoSuchMethodException.
|
||||
-keepclassmembers class * implements androidx.glance.appwidget.action.ActionCallback {
|
||||
<init>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue