From d3bc4499dbcf79e17bc786a71683a8d07a25d942 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Wed, 1 Jul 2026 11:35:42 +0200 Subject: [PATCH] build: Suppress obsolete Java 8 option warning under JDK 21+ 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) --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 93c82cd8c9..84c9f0cad5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -109,7 +109,7 @@ allprojects { maxHeapSize = "2g" } withType().configureEach { - options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try")) + options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try", "-Xlint:-options")) } } }