Skip to content

Commit 844c3e8

Browse files
runningcodeclaude
andauthored
build: Suppress obsolete Java 8 option warning under JDK 21+ (#5664)
The root build compiles Java with -Xlint:all -Werror. On JDK 21+, javac flags -source/-target 8 as obsolete, and -Werror promotes that warning to an error, failing :sentry:compileJava. CI pins JDK 17, where the warning does not exist, so this only breaks local builds and tooling on newer JDKs (e.g. the Kotlin LSP's bundled JDK 25, whose Gradle project import aborts and loses cross-module resolution). Add -Xlint:-options, the suppression javac itself recommends when intentionally targeting an older release. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ea2a517 commit 844c3e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ allprojects {
105105
)
106106
}
107107
withType<JavaCompile>().configureEach {
108-
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try"))
108+
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try", "-Xlint:-options"))
109109
}
110110
}
111111
}

0 commit comments

Comments
 (0)