Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 7bfc187

Browse files
committedJul 23, 2024
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 :fluxc-processor:kaptGenerateStubsKotlin FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':fluxc-processor:kaptGenerateStubsKotlin'. > Inconsistent JVM-target compatibility detected for tasks 'compileJava' (1.7) and 'kaptGenerateStubsKotlin' (17). Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain Learn more about JVM-target validation: https://kotl.in/gradle/jvm/ target-validation
1 parent 52496b4 commit 7bfc187

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed
 

‎build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
// Those declarations are just a workaround for a false-positive Kotlin Gradle Plugin warning
35
// https://youtrack.jetbrains.com/issue/KT-46200
@@ -57,6 +59,12 @@ allprojects {
5759
parallel = true
5860
debug = false
5961
}
62+
63+
tasks.withType(KotlinCompile).all {
64+
kotlinOptions {
65+
jvmTarget = JavaVersion.VERSION_1_8
66+
}
67+
}
6068
}
6169

6270
ext {

‎fluxc-annotations/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ java {
88
withJavadocJar()
99
}
1010

11-
sourceCompatibility = JavaVersion.VERSION_1_7
12-
targetCompatibility = JavaVersion.VERSION_1_7
11+
sourceCompatibility = JavaVersion.VERSION_1_8
12+
targetCompatibility = JavaVersion.VERSION_1_8
1313

1414
project.afterEvaluate {
1515
publishing {

‎fluxc-processor/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ java {
1010
withJavadocJar()
1111
}
1212

13-
sourceCompatibility = JavaVersion.VERSION_1_7
14-
targetCompatibility = JavaVersion.VERSION_1_7
13+
sourceCompatibility = JavaVersion.VERSION_1_8
14+
targetCompatibility = JavaVersion.VERSION_1_8
1515

1616
dependencies {
1717
implementation fluxcAnnotationsProjectDependency

0 commit comments

Comments
 (0)
This repository has been archived.