Skip to content

Commit d3bc449

Browse files
runningcodeclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 307edcd commit d3bc449

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
@@ -109,7 +109,7 @@ allprojects {
109109
maxHeapSize = "2g"
110110
}
111111
withType<JavaCompile>().configureEach {
112-
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try"))
112+
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try", "-Xlint:-options"))
113113
}
114114
}
115115
}

0 commit comments

Comments
 (0)