vlsi opened a new pull request, #5278: URL: https://github.com/apache/calcite/pull/5278
Previously javac came from whichever JDK ran Gradle, so the compiler differed between CI jobs and between developers' machines. Only `sourceCompatibility`/`targetCompatibility` 1.8 kept the bytecode at Java 8, and nothing checked that the code uses only the Java 8 API. `JavaCompile` tasks now take their compiler from a Gradle toolchain whose version is set by the `jdkBuildVersion` property (default `25`), and pass `--release 8`. Tests, javadoc, and `JavaExec` tasks still run on the JDK that runs Gradle, so the existing JDK 8/11/17/21/24 test coverage is unchanged. The foojay toolchain resolver (1.0.0) downloads the build JDK when it is not installed. It requires Gradle to run on Java 17 or later, so `settings.gradle.kts` applies it only there; when Gradle runs on Java 8 or 11, the build JDK must already be installed. CI: every job installs JDK 25 next to the JDK it tests with, and the test JDK stays the default. The ErrorProne and Checker Framework jobs pass `-PjdkBuildVersion=11`, because ErrorProne 2.5.1 fails on JDK 25 with `IllegalAccessError: class com.google.errorprone.JavacErrorDescriptionListener ... cannot access class com.sun.tools.javac.tree.JCTree$JCCompilationUnit`. Verification: locally, `build -x test javadoc` passes, classes have major version 52, and with Gradle on JDK 8 the compiler is JDK 25 while `:linq4j:test` runs on JDK 8. The `jandex` task is part of `check`, so every CI `build` job parses the produced bytecode. The Jira issue is not filed yet; `CALCITE-XXXX` in the title is a placeholder to replace before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
