Skip to content

Commit

Permalink
throw warning when incompatible com.android.application plugin is used
Browse files Browse the repository at this point in the history
see #1909
  • Loading branch information
jonasbark committed Sep 28, 2024
1 parent e04c0be commit 31b72b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/stripe_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,12 @@ 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
print("android plugin version: " + androidPluginVersion)
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")
}
}

0 comments on commit 31b72b1

Please sign in to comment.