From 3d4bba789b37b246e31c162c28021b438707e5ad Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 22 Jul 2020 11:00:53 +1000 Subject: [PATCH 1/2] Disable proguard for SDK release builds Proguard should be performed by the app importing the SDK. The proguard rules specific to the SDK will automatically be appended to the rules specified by the application. --- afterpay/build.gradle | 7 ------- afterpay/consumer-rules.pro | 2 ++ afterpay/proguard-rules.pro | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 afterpay/proguard-rules.pro diff --git a/afterpay/build.gradle b/afterpay/build.gradle index 8f4c6d3e..0501fc29 100644 --- a/afterpay/build.gradle +++ b/afterpay/build.gradle @@ -26,13 +26,6 @@ android { kotlinOptions { jvmTarget = versions.java } - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } } dependencies { diff --git a/afterpay/consumer-rules.pro b/afterpay/consumer-rules.pro index e69de29b..c4a7250e 100644 --- a/afterpay/consumer-rules.pro +++ b/afterpay/consumer-rules.pro @@ -0,0 +1,2 @@ +-keep class com.afterpay.android.** { *; } +-dontwarn com.afterpay.android.** diff --git a/afterpay/proguard-rules.pro b/afterpay/proguard-rules.pro deleted file mode 100644 index 7da86c3a..00000000 --- a/afterpay/proguard-rules.pro +++ /dev/null @@ -1,2 +0,0 @@ --keep class com.afterpay.android.Afterpay { *; } --keep class com.afterpay.android.CancellationStatus { *; } From 9c85e45f012ac8cd4d5f5b1e95bc10f0f8ae0b91 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 22 Jul 2020 12:23:14 +1000 Subject: [PATCH 2/2] Remove unneeded proguard rules --- afterpay/consumer-rules.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/afterpay/consumer-rules.pro b/afterpay/consumer-rules.pro index c4a7250e..e69de29b 100644 --- a/afterpay/consumer-rules.pro +++ b/afterpay/consumer-rules.pro @@ -1,2 +0,0 @@ --keep class com.afterpay.android.** { *; } --dontwarn com.afterpay.android.**