-dontwarn org.xmlpull.v1.**
-keep class org.xmlpull.v1.** {*;}

-dontwarn android.content.res.**
# kxml2's META-INF/services/org.xmlpull.v1.XmlPullParserFactory lists parser and
# serializer as a comma-separated entry that R8 parses literally as a missing class.
-dontwarn org.kxml2.io.**

-keep class org.xmlpull.** { *; }
-keepclassmembers class org.xmlpull.** { *; }

-assumenosideeffects class android.util.Log {
    public static boolean isLoggable(java.lang.String, int);
    public static int v(...);
    public static int d(...);
    public static int i(...);
}

-keepnames class <1>$$serializer {static <1>$$serializer INSTANCE;}

# BrowserAction subclass simple-names are used as stable IDs persisted in
# SharedPreferences (gesture bindings). R8 must keep both the parent sealed
# class and every nested subclass — if the parent is renamed while the
# subclasses keep their original FQN, getSimpleName() on the nested class
# falls back to parsing a now-inconsistent binary name and returns a string
# that no longer matches BrowserActionCatalog ids.
-keepnames class info.plateaukao.einkbro.browser.BrowserAction
-keepnames class info.plateaukao.einkbro.browser.BrowserAction$* { }

# pdfbox-android: JPEG2000 support is optional (jp2-android not bundled)
-dontwarn com.gemalto.jp2.**
# pdfbox-android: BouncyCastle excluded (only needed for encrypted PDFs)
-dontwarn org.bouncycastle.**