From 3c012019fb3747009d4fd2bbd6193fa095b934cd Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Tue, 29 Nov 2022 13:08:49 -0800 Subject: [PATCH 1/3] Add module pro guard file --- android/build.gradle | 1 + android/proguard-rules.txt | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 android/proguard-rules.txt diff --git a/android/build.gradle b/android/build.gradle index bca5d1fc4..e82a2a217 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -35,6 +35,7 @@ android { versionName "1.0" vectorDrawables.useSupportLibrary = true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles 'proguard-rules.txt' } buildTypes { diff --git a/android/proguard-rules.txt b/android/proguard-rules.txt new file mode 100644 index 000000000..ca367208b --- /dev/null +++ b/android/proguard-rules.txt @@ -0,0 +1,7 @@ +-keepclassmembers class com.google.android.gms.tapandpay.** { + public *; +} + +-keepclassmembers class com.stripe.android.pushProvisioning.** { + public *; +} From 715770c726fbe5a17a989c44e5d9c9e3fe26fa01 Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Tue, 29 Nov 2022 13:09:08 -0800 Subject: [PATCH 2/3] example app changes --- example/android/app/build.gradle | 2 ++ example/android/app/proguard-rules.pro | 2 ++ example/ios/Podfile.lock | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 54c5e1160..67379032d 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -231,6 +231,8 @@ android { buildTypes { debug { signingConfig signingConfigs.debug + minifyEnabled true + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } release { // Caution! In production, you need to generate your own keystore file. diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro index 11b025724..a24f3fd2a 100644 --- a/example/android/app/proguard-rules.pro +++ b/example/android/app/proguard-rules.pro @@ -8,3 +8,5 @@ # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: +-keep class com.facebook.react.devsupport.** { *; } +-dontwarn com.facebook.react.devsupport.** diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 0d9376c88..7f918fa36 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -374,7 +374,7 @@ PODS: - StripePayments (= 23.2.0) - StripePaymentsUI (= 23.2.0) - StripeUICore (= 23.2.0) - - stripe-react-native (0.20.0): + - stripe-react-native (0.21.0): - React-Core - Stripe (~> 23.2.0) - StripeApplePay (~> 23.2.0) @@ -382,7 +382,7 @@ PODS: - StripePayments (~> 23.2.0) - StripePaymentSheet (~> 23.2.0) - StripePaymentsUI (~> 23.2.0) - - stripe-react-native/Tests (0.20.0): + - stripe-react-native/Tests (0.21.0): - React-Core - Stripe (~> 23.2.0) - StripeApplePay (~> 23.2.0) @@ -637,7 +637,7 @@ SPEC CHECKSUMS: RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 Stripe: cc895392856dc7f401119a612e31f020b97cb8d1 - stripe-react-native: 0aafc0344b8846d1a35f1cdc56c03aa5da878208 + stripe-react-native: febc743cbd836030519cb3a0e53b858e06225f44 StripeApplePay: 7e43d6b4b9f18e922ba683e549f199a4f6db6fde StripeCore: 6da916796f87ab91f3dae1d78a93602465964cbc StripeFinancialConnections: 312fbe670871c7a3227dce0e092d7d5bf209f75e From 723263fd97432d6dd2745828c6c2712187c88f5f Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Tue, 29 Nov 2022 13:18:10 -0800 Subject: [PATCH 3/3] [skip actions] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8efb72514..9fb766d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Fixes - Fixed an issue where builds would error with the message `'const' enums are not supported.` [see commit](https://github.com/stripe/stripe-react-native/commit/f882bfa588aa6d23a980b4b43d2cca660ca1dd2a) +- Fixed an issue where the `canAddCardToWallet` method would sometimes wrongly return `false` with a `details.status` of `MISSING_CONFIGURATION` in production builds. [#1215](https://github.com/stripe/stripe-react-native/pull/1215) ## 0.21.0 - 2022-11-15