Skip to content

Commit 40ccaae

Browse files
build: address different JavaCompile and KotlinCompile versions
1 parent 87b5da5 commit 40ccaae

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,17 @@ subprojects {
5454
testImplementation(rootProject.testLibs.gson) /* Used by Approvals for pretty-printing JSON */
5555
}
5656

57-
val projectTargetsJava16 = this.name == "bytecode-scanner-tests"
58-
if (!projectTargetsJava16) {
57+
val projectUsesJava16Toolchain = this.name == "bytecode-scanner-tests"
58+
|| this.name == "bytecode-samples-java"
59+
if (!projectUsesJava16Toolchain) {
5960
tasks.withType<KotlinCompile> {
6061
kotlinOptions.jvmTarget = "11"
6162
}
63+
64+
tasks.withType<JavaCompile> {
65+
sourceCompatibility = JavaVersion.VERSION_11.toString()
66+
targetCompatibility = JavaVersion.VERSION_11.toString()
67+
}
6268
}
6369

6470
tasks.withType<Test> {

0 commit comments

Comments
 (0)