From 523ba6c4ed0173fd9b74300a71d62674fa5d57e6 Mon Sep 17 00:00:00 2001 From: Petros Paraskevopoulos Date: Fri, 5 Jul 2024 12:44:07 +0300 Subject: [PATCH] Build: Add jvm target to point to java 8 to kotlin options This change is necessary because otherwise the build fails with the below exception: ------------------------------------------------------------------------ > Task :WordPressUtils:compileDebugKotlin FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':WordPressUtils: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 --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 6ff233cf6..053dcb333 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,7 @@ allprojects { } tasks.withType(KotlinCompile).all { kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 allWarningsAsErrors = true } }