Skip to content

Commit 343e70a

Browse files
Abduqodiri Qurbonzodawoainikk
authored andcommitted
Configure Java source/targetCompatibility to match Kotlin jvmTarget
Otherwise, an error is reported.
1 parent c581d95 commit 343e70a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/kotlin-kts/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ dependencies {
2525
implementation(project(":kotlinx-benchmark-runtime"))
2626
}
2727

28+
tasks.withType<JavaCompile> {
29+
sourceCompatibility = "1.8"
30+
targetCompatibility = "1.8"
31+
}
32+
33+
2834
tasks.withType<KotlinCompile> {
2935
kotlinOptions {
3036
jvmTarget = "1.8"

examples/kotlin/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ sourceSets.all {
2121
java.srcDirs = ["$it.name/src"]
2222
resources.srcDirs = ["$it.name/resources"]
2323
}
24+
compileJava {
25+
sourceCompatibility = "1.8"
26+
targetCompatibility = "1.8"
27+
}
2428

2529
compileKotlin {
2630
kotlinOptions.jvmTarget = "1.8"

0 commit comments

Comments
 (0)