# Keep all the generator annotations. These are currently retained in runtime due to a way that
# the generator accesses them.
-dontwarn com.scandit.datacapture.internal.sdk.tools.annotations.**

# Don't warn about Kotlin's module-info class present in a file of a different name.
-dontwarn module-info

# Don't note about our SDK and Microblink. These are notes about internal/private methods that
# we need to keep, for which descriptor classes are obfuscated.
-dontnote com.scandit.**
-dontnote com.microblink.**
-dontnote android.hardware.camera2.utils.TypeReference # Accessed by reflection in Microblink

# Preserve all native method names and the names of their classes, so they can be linked to
# the native library.
-keepclasseswithmembernames,includedescriptorclasses class com.scandit.** {
    native <methods>;
}

# Keep all the classes and their public methods generated by Djinni, as well as other
# members required by the native layer.
-keep @interface com.scandit.datacapture.internal.sdk.annotations.DjinniGenerated

-keep @com.scandit.datacapture.internal.sdk.annotations.DjinniGenerated class com.scandit.** {
    !private <methods>;
    !private <fields>;
    private long nativeRef;
    private <init>(long);
}

# Keep all the classes and class members annotated as used by reflection
-keep @interface com.scandit.datacapture.core.internal.sdk.UsedByReflection

-keep @com.scandit.datacapture.core.internal.sdk.UsedByReflection class com.scandit.**

-keepclassmembers class  com.scandit.** {
  @com.scandit.datacapture.core.internal.sdk.UsedByReflection *;
}