fix: keep WorkManager's Room database constructor in release builds

This commit is contained in:
2026-10-20 10:36:20 +02:00
parent 9c17d65088
commit 0803d0f5ad
6 changed files with 79 additions and 19 deletions
+9
View File
@@ -9,3 +9,12 @@
# Coroutines: keep the internal classes R8 sometimes struggles to strip correctly.
-dontwarn kotlinx.coroutines.**
# WorkManager 2.7.0 arrives transitively through play-services-ads and creates
# androidx.work.impl.WorkDatabase_Impl through Room's reflection. R8 removes the
# generated no-arg constructor because nothing calls it directly, which makes the
# app crash in androidx.startup.InitializationProvider with:
# Failed to create an instance of androidx.work.impl.WorkDatabase
-keep class androidx.work.impl.WorkDatabase_Impl {
public <init>();
}