fix(train): keep what WorkManager and Polar's firmware service need from R8
v0.1.0 crashed on every start: R8's full mode (AGP 9) took Room 2.6.1's
`-keep class * extends RoomDatabase` to keep no constructor, and WorkManager
creates its database by reflection (NoSuchMethodException
WorkDatabase_Impl.<init>). Checking the Loop's firmware failed too: Polar's
SDK asks through Retrofit 2.9.0, whose rules predate the full mode, and
Retrofit lost the generic signatures of its suspend functions ("Class cannot
be cast to ParameterizedType").
Train's own proguard-rules.pro keeps the database's constructor, adds
Retrofit 2.11's three rules and keeps the firmware service's requests and
replies, which Gson fills. Debug builds don't shrink, so neither showed
before the release; checked on a Pixel 9a with a release build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
d981747728
commit
58f9b3a472
1 changed files with 26 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ android {
|
|||
release {
|
||||
signingConfig =
|
||||
signingConfigs.findByName("release") ?: signingConfigs.getByName("debug")
|
||||
// Train's keep rules for R8, beside the libraries' and Flutter's.
|
||||
proguardFiles("proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue