From 1c2622fc29145d1abcc0a8be55f0e7bd52a92423 Mon Sep 17 00:00:00 2001 From: David Miguel Lozano Date: Tue, 28 Nov 2023 21:16:02 +0100 Subject: [PATCH] Fix Inconsistent JVM-target compatibility error (#1492) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following error: ``` * What went wrong: Execution failed for task ':stripe_android:compileDebugKotlin'. > Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17). Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation ``` Co-authored-by: RĂ©mon --- packages/stripe_android/android/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/stripe_android/android/build.gradle b/packages/stripe_android/android/build.gradle index 20fbf3894..c167d2f5f 100644 --- a/packages/stripe_android/android/build.gradle +++ b/packages/stripe_android/android/build.gradle @@ -35,6 +35,10 @@ android { targetCompatibility JavaVersion.VERSION_17 } + kotlinOptions { + jvmTarget = '17' + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' }