card.io Android SDK ProGuard rules

card.io – library that provides fast, easy credit card scanning in mobile apps.

ProGuard rules for card.io

Unused classes, attributes, fields and methods will be removed by ProGuard's optimization phase. ProGuard obfuscates the remaining classes, fields, and methods with short names. You have to specify the following rules in your ProGuard configuration file.

# Don't obfuscate DetectionInfo or public fields, since
# it is used by native methods
-keep class io.card.payment.DetectionInfo
-keepclassmembers class io.card.payment.DetectionInfo {
    public *;
}

-keep class io.card.payment.CreditCard
-keep class io.card.payment.CreditCard$1
-keepclassmembers class io.card.payment.CreditCard {
  *;
}

-keepclassmembers class io.card.payment.CardScanner {
  *** onEdgeUpdate(...);
}

# Don't mess with classes with native methods

-keepclasseswithmembers class * {
    native ;
}

-keepclasseswithmembernames class * {
    native ;
}

-keep public class io.card.payment.* {
    public protected *;
}

# required to suppress errors when building on android 22
-dontwarn io.card.payment.CardIOActivity

For more information about card.io please see the website.

Static Gson ProGuard rules

Popular ProGuard rules