Repository navigation
Compile Java 8-compatible artifacts without requiring JDK 8 - #49
Merged
Merged
Conversation
litlep-nibbyt
marked this pull request as ready for review
November 10, 2026 01:33
litlep-nibbyt
force-pushed
the
joie/java8-release-compat
branch
from
November 10, 2026 01:38
f9acd88 to
7bc04ba
Compare
litlep-nibbyt
marked this pull request as draft
November 10, 2026 01:40
litlep-nibbyt
marked this pull request as ready for review
November 10, 2026 01:41
Quinn-With-Two-Ns
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
--release 8to enforce Java 8 bytecode and standard-library API compatibility.Why
The
ubuntu-latestGitHub Actions runner moved from Ubuntu 24.04 to Ubuntu 26.04. The older image included JDK 8, while the newer image does not.The workflow explicitly installs Java 11, but the Gradle build requested an actual Java 8 compiler toolchain. This meant the build implicitly depended on JDK 8 being preinstalled by the runner image. Once that changed, Gradle failed before running tests:
Using
--release 8preserves Java 8 bytecode and API compatibility without requiring an installed JDK 8 toolchain. It also matches the compatibility approach used by the main Temporal Java SDK.Failed run: https://github.com/nexus-rpc/sdk-java/actions/runs/42727692815
Testing
./gradlew --no-daemon test./gradlew --no-daemon -x spotlessCheckgit diff --checkCI verification
To verify that this change directly addresses the runner-image dependency, the old Java 8 toolchain configuration was temporarily restored on this branch and tested against the current GitHub Actions runner.
build-lint-testjob passed: https://github.com/nexus-rpc/sdk-java/actions/runs/42737272568This confirms that the failure is caused by relying on JDK 8 from the runner image and that compiling with
--release 8removes that dependency.