Skip to content

Commit

Permalink
One fix for Android, one check for com.android.application and one iO…
Browse files Browse the repository at this point in the history
…S fix (#1942)

* Fix border radius handling, see #1933

* throw warning when incompatible com.android.application plugin is used

see #1909

* throw warning when incompatible com.android.application plugin is used

see #1909

* remove unnecessary println

* Fix iOS issue from #1928
  • Loading branch information
jonasbark authored Oct 1, 2024
1 parent b1fe711 commit 980dc2b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions packages/stripe_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ dependencies {
// Users need to declare this dependency on their own, otherwise all methods are a no-op
compileOnly 'com.stripe:stripe-android-issuing-push-provisioning:1.1.0'
}

afterEvaluate {
// check version of com.android.application - fail if 8.0.0 or higher
def androidPluginVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
if (androidPluginVersion >= '8.0.0') {
throw new GradleException("flutter_stripe: Stripe Android SDK requires com.android.application plugin lower than 8.0.0.\nSee https://github.com/flutter-stripe/flutter_stripe/issues/1909\n")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public boolean hasKey(String key) {

public Integer getInt(String key) throws Exception {
if (map.opt(key) instanceof Double) {
throw new Exception("We've got a double here");
return (int) getDouble(key);
}
return map.getInt(key);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/stripe_ios/ios/Classes/CardFieldFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ extension CardFieldView {
cardParams.type = STPPaymentMethodType.card
cardParams.card = cardMethodParams

self.cardField.paymentMethodParams.card = cardMethodParams
self.cardField.paymentMethodParams = STPPaymentMethodParams.paramsWith(card: cardMethodParams, billingDetails: nil, metadata: nil)
self.cardField.postalCode = params["postalCode"] as? String
self.cardParams = cardParams
self.cardPostalCode = params["postalCode"] as? String
Expand Down

1 comment on commit 980dc2b

@andrzejp-iRonin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we get the plugin work on Gradle 8 ?

Please sign in to comment.