Skip to content

ci: upgrade to JDK 21 and google-java-format 2.3.0 - #185

Open
dvacca-onfido wants to merge 2 commits into
masterfrom
fix/upgrade-google-java-format
Open

ci: upgrade to JDK 21 and google-java-format 2.3.0#185
dvacca-onfido wants to merge 2 commits into
masterfrom
fix/upgrade-google-java-format

Conversation

@dvacca-onfido

@dvacca-onfido dvacca-onfido commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

CI fails with:

Error: google-java-format exited with exit code 1.
  • google-java-format@1.4.0 is incompatible with JDK 17+
  • The latest version (2.3.0) requires JDK 21 to run

Changes

  • Upgraded google-java-format from 1.4.0 to 2.3.0
  • Upgraded CI JDK from 17 (adopt) to 21 (temurin) for linting and build/tests
  • The project still compiles to Java 1.8 bytecode, so JDK 21 is fully backwards-compatible

Rationale

  • JDK 17 EOL is ~October 2027; JDK 21 (LTS) is supported until 2029
  • google-java-format upstream now requires JDK 21 as minimum runtime
  • Simplifies the workflow to a single JDK setup step

Notes

  • Formatting rules may differ slightly between versions, so test files may need a one-time reformat if the linter step fails with --set-exit-if-changed

@dvacca-onfido dvacca-onfido self-assigned this Aug 13, 2026
@dvacca-onfido dvacca-onfido changed the title fix: upgrade google-java-format from 1.4.0 to 2.3.0 fix: upgrade google-java-format to fix JDK 17 CI failure Aug 13, 2026
google-java-format now requires JDK 21 to run. Updated the CI workflow to:
- Use JDK 21 (temurin) for the linting step
- Upgrade google-java-format from 1.4.0 to 2.3.0
- Set up JDK 17 after linting for the build/tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dvacca-onfido
dvacca-onfido force-pushed the fix/upgrade-google-java-format branch from 13433dd to 1caeab5 Compare August 13, 2026 15:09
@dvacca-onfido dvacca-onfido changed the title fix: upgrade google-java-format to fix JDK 17 CI failure fix: upgrade google-java-format and use JDK 21 for linting Aug 13, 2026
The project compiles to Java 1.8 bytecode, so running on JDK 21 is fully
compatible. This simplifies the workflow by using a single JDK version
and aligns with the google-java-format requirement for JDK 21.

JDK 17 EOL is October 2027; JDK 21 (LTS) is supported until 2029.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dvacca-onfido dvacca-onfido changed the title fix: upgrade google-java-format and use JDK 21 for linting ci: upgrade to JDK 21 and google-java-format 2.3.0 Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant