# Keep the companion object's *class name* in step with the `Companion` field R8 leaves on the
# interface. Without this, R8 renames com.microblink.digital.analytics.WorkerService$Companion to
# $a and rewrites the interface's kotlin.Metadata to match, while the field itself stays
# `Companion` — so a Kotlin consumer that resolves WorkerService.Companion compiles clean and then
# throws NoSuchFieldError at runtime. Only an internal const lives in this companion today, so
# nothing reachable trips; the rule keeps the published shape correct as members are added.
-keep public class com.microblink.digital.analytics.WorkerService$Companion {
    public *;
}

# Room's generated *_Impl classes under R8 full mode.
#
# This module puts androidx.work on your runtime classpath, and androidx.work brings androidx.room
# with it. Room's consumer rule named no members before 2.7.0:
#
#   -keep class * extends androidx.room.RoomDatabase
#
# R8 full mode - the AGP default for an app - does not implicitly keep a kept class's default
# constructor, so the generated androidx.work.impl.WorkDatabase_Impl survives by name but loses
# the <init>() Room instantiates it with, and WorkManager's initializer takes the app down on
# first launch with `NoSuchMethodException: androidx.work.impl.WorkDatabase_Impl.<init> []`.
#
# We resolve work-runtime 2.11.2, which brings Room 2.7.0 and the corrected rule, so this line is
# normally redundant. It is kept because pinning or substituting Room below 2.7.0 silently removes
# the rule Room ships, and the resulting break is invisible at build time and fatal at launch.
-keep class * extends androidx.room.RoomDatabase { void <init>(); }
