# Train's own rules for R8, beside those the libraries bring. # WorkManager (the Loop's and the music's workers, ADR 0030, D37) creates its # Room database by reflection as the app starts. Room 2.6.1, which WorkManager # 2.10.1 brings, keeps that class with `-keep class * extends RoomDatabase` # alone, which R8's full mode (AGP 9's) no longer takes to keep its # constructor: v0.1.0 crashed on every start with NoSuchMethodException # WorkDatabase_Impl.. Drop this once Room's own rule keeps it. -keep class * extends androidx.room.RoomDatabase { (); } # Polar's SDK asks Polar's firmware service (ADR 0030, D10, D40) through # Retrofit 2.9.0, whose rules predate R8's full mode: without the generic # signatures of its suspend functions (Continuation>) Retrofit # fails, "Class cannot be cast to ParameterizedType", and checking the Loop's # firmware did in v0.1.0. These three are Retrofit 2.11's own rules. -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation # The firmware service's requests and replies, which Gson writes and fills by # reflection. -keep class com.polar.androidcommunications.http.** { *; }