Skip to content

Commit 9a3962e

Browse files
authored
Keep reflective Room database constructors (#1109)
Minified `legacy` and `lollipop` builds can fail to initialize WorkManager during background sync with `InstantiationException` / `NoSuchMethodException`. With **AGP 9.4.1 / R8 9.4.24** strict full-mode keep semantics, Room 2.5.0/2.6.1 consumer rules keep database classes but allow removal of the public no-argument constructor used by reflection, including `WorkDatabase_Impl()`.
1 parent d37a000 commit 9a3962e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @MadeByLLM("gpt-6-astra")
2+
# Room 2.5.0/2.6.1 consumer rules omit the constructor used by reflection.
3+
-keepclassmembers class * extends androidx.room.RoomDatabase {
4+
public <init>();
5+
}

0 commit comments

Comments
 (0)