Releases: google/google-java-format
Releases · google/google-java-format
v1.16.0
v1.15.0
What's Changed
- Passing
--add-exports
flags on the command line is no longer necessary for JDK 17 and newer (ee81afc)
Full Changelog: v1.14.0...v1.15.0
1.14.0
What's Changed
- Handle modifiers that start with
non-
(#696) - Treat single-character upper case identifiers as UpperCamelCase, to improve formatting of Android
R
classes (16e72a1) - Don't format javadoc without a summary fragment as a single-line (668f108)
Full Changelog: v1.13.0...v1.14.0
1.13.0
1.12.0
1.11.0
google-java-format
now has improved support for running on JDK 17 early access builds.
Changes:
- Handle
final
variables ininstanceof
patterns (#588) - Fix handling of annotations in compact record constructors (#574)
- Fix a crash in
instanceof
pattern handling (#594) - Wrap multiple values in switch expression case (#540)
- Fix formatting of module trees after JDK-8255464
- Support
sealed
classes (#603)
1.10.0
google-java-format
now supports running on JDK 16. The following flags are required when running on JDK 16, due to JEP 396: Strongly Encapsulate JDK Internals by Default:
java \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
-jar google-java-format-1.10.0-all-deps.jar T...
Other changes:
1.9
1.8
Changes:
- The minimum supported runtime version is now JDK 11.
- Initial support for Java 14 language features, including preview features. (Only available when running the formatter on JDK 14 or newer.)
- Flag control of javadoc formatting (
--skip-javadoc-formatting
). - Reflowing string literals that exceed the column limit.
Fixes
- Handle unary negation when formatting tabular arguments (#400)
- Remove trailing tabs from comments to make behavior idempotent (#422)
- Fix a crash on c-style arrays in parameters (#374)
- Fix import reorderer to handle single-line-comments in imports (f246638)
- Handle double semi-colons after package statements (5e114ca)
1.7
Changes
- Treat expressions ending in
.stream()
as a syntactic unit - Keep going if a file cannot be read, and report a non-zero exit status, similar to handling of syntax errors.