On This Page
REST API
Configuring ProGuard Rules to Enable Obfuscation
Follow these steps to configure ProGuard rules that enable obfuscation:
- To enable obfuscation for any of your build types, define the setting in the relevantbuild.gradlefile for your app.buildTypes { release { isMinifyEnabled = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } }
- If you are using ProGuard as an obfuscation tool in your app, add these rules to theproguard-rules.profile.# OkHttp -keepattributes Signature -keepattributes *Annotation* -dontwarn com.squareup.okhttp.** -keep class com.squareup.okhttp.* { *; } -dontwarn okio.** # Acceptance Devices -keep class io.mpos.** { *; } -dontwarn io.mpos.** -keep class com.visa.vac.tc.** {*;} -keep class com.nimbusds.jose.** {*;} -keep class org.bouncycastle.** {*;} -keep class retrofit2.** { *; } -keep interface retrofit2.** { *; } -keep class com.visa.auth.** { *; } -dontwarn com.visa.auth.** -keep class androidx.** { *; } # Visa Sensory Branding -keep class com.visa.SensoryBrandingView # Mastercard Sonic Branding -keep class com.mastercard.sonic.BuildConfig {*;}