Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing minimum supported JDK (and dropping support for JDK 11) #1159

Open
cushon opened this issue Sep 11, 2024 · 4 comments
Open

Increasing minimum supported JDK (and dropping support for JDK 11) #1159

cushon opened this issue Sep 11, 2024 · 4 comments

Comments

@cushon
Copy link
Collaborator

cushon commented Sep 11, 2024

Following the example of google/error-prone#3803, we're considering removing support for running google-java-format on JDK 11. The new minimum supported JDK would be JDK 17 (the next LTS release after 11).

google-java-format would still fully support formatting earlier source code versions, it would just require running the tool on JDK 17 or later.

@cushon cushon pinned this issue Sep 11, 2024
@sormuras
Copy link
Contributor

Doesn't the runtime version determine the source code version at the moment? Or does GJF support a --source 11 option? 🤔

@tbroyer
Copy link
Contributor

tbroyer commented Sep 12, 2024

Afaict it determines what can be parsed but not how it'll be formatted.

@cushon
Copy link
Collaborator Author

cushon commented Sep 12, 2024

Afaict it determines what can be parsed but not how it'll be formatted.

Right, it'll parse at whatever the newest language level supported by the runtime is, and shouldn't affect formatting. Newer source versions are usually a superset of older ones, but there are some occasional breaking changes like new reserved identifiers, #975 is a related FR about making the source version g-j-f parses at configurable.

@cushon
Copy link
Collaborator Author

cushon commented Oct 4, 2024

I just pushed another release, and am planning to update the minimum supported JDK to 17 for the next release after that one: https://github.com/google/google-java-format/releases/tag/v1.24.0

copybara-service bot pushed a commit that referenced this issue Oct 4, 2024
copybara-service bot pushed a commit that referenced this issue Oct 4, 2024
copybara-service bot pushed a commit that referenced this issue Oct 5, 2024
copybara-service bot pushed a commit that referenced this issue Oct 5, 2024
copybara-service bot pushed a commit that referenced this issue Oct 5, 2024
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

No branches or pull requests

3 participants