Skip to content

Commit 85b7b5a

Browse files
committed
remove JDK 21 check because it'll always be true from now on
1 parent d213d41 commit 85b7b5a

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

buildSrc/src/main/kotlin/ai.java-conventions.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ tasks.withType<JavaCompile>().configureEach {
3232
with(options) {
3333
release.set(8)
3434
compilerArgs.add("-Werror")
35-
// We need to support compiling to Java 8 even when using JDK 21 to build.
35+
// We need to support compiling to Java 8.
3636
// Suppress obsolete source/target warning added in JDK 21 while retaining -Werror for everything else.
3737
// This only disables the 'options' lint category (e.g., the obsolete source/target messages).
38-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
39-
compilerArgs.add("-Xlint:-options")
40-
}
38+
compilerArgs.add("-Xlint:-options")
4139
}
4240
}
4341

buildSrc/src/main/kotlin/ai.smoke-test.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ tasks.withType<JavaCompile>().configureEach {
3838
with(options) {
3939
release.set(8)
4040
compilerArgs.add("-Werror")
41-
// We need to support compiling to Java 8 even when using JDK 21 to build.
41+
// We need to support compiling to Java 8.
4242
// Suppress obsolete source/target warning added in JDK 21 while retaining -Werror for everything else.
4343
// This only disables the 'options' lint category (e.g., the obsolete source/target messages).
44-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
45-
compilerArgs.add("-Xlint:-options")
46-
}
44+
compilerArgs.add("-Xlint:-options")
4745
}
4846
}
4947

smoke-tests/apps/DiagnosticExtension/MockExtension/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ tasks.withType<JavaCompile>().configureEach {
1818
with(options) {
1919
release.set(8)
2020
compilerArgs.add("-Werror")
21-
// We need to support compiling to Java 8 even when using JDK 21 to build.
21+
// We need to support compiling to Java 8.
2222
// Suppress obsolete source/target warning added in JDK 21 while retaining -Werror for everything else.
2323
// This only disables the 'options' lint category (e.g., the obsolete source/target messages).
24-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
25-
compilerArgs.add("-Xlint:-options")
26-
}
24+
compilerArgs.add("-Xlint:-options")
2725
}
2826
}
2927

0 commit comments

Comments
 (0)