Google Java Format Versions Save

Reformats Java source code to comply with Google Java Style.

v1.15.0

2 years ago

What's Changed

Full Changelog: https://github.com/google/google-java-format/compare/v1.14.0...v1.15.0

v1.14.0

2 years ago

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 (16e72a1a9bbf182fac6686807e54bc846a9543ed)
  • Don't format javadoc without a summary fragment as a single-line (668f108de438db15158d33ed1a386bdbab3b4d09)

Full Changelog: https://github.com/google/google-java-format/compare/v1.13.0...v1.14.0

v1.13.0

2 years ago

What's Changed

  • Fix formatting of pattern matching in switch when running on Java 17 (#689, #690)

Full Changelog: https://github.com/google/google-java-format/compare/v1.12.0...v1.13.0

v1.12.0

2 years ago

What's Changed

Full Changelog: https://github.com/google/google-java-format/compare/v1.11.0...v1.12.0

v1.11.0

2 years ago

google-java-format now has improved support for running on JDK 17 early access builds.

Changes:

  • Handle final variables in instanceof 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)

v1.10.0

3 years ago

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:

google-java-format-1.9

3 years ago
  • Add support for yield statements (#489)
  • Fix a crash in expression switches (#477)

google-java-format-1.8

4 years ago

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

google-java-format-1.7

5 years ago

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.

google-java-format-1.6

5 years ago

Features

  • Don't format annotations as block-like constructs (#159)
  • Add horizontal whitespace between varargs specifiers and type annotations (#282)
  • Don't add spaces to //$NON-NLS-x$ comments (#221)
  • Unify breaks between type parameters
  • Add support for --assume-filename

Incompatible changes

  • Version 1.6.1 of the IntelliJ plugin now notifies if google-java-format hasn't been configured for new projects. (Version 1.6.0 of the plugin enabled the formatter by default, but this behaviour was reverted in 1.6.1. See #290.)

Bug Fixes

  • Don't crash on empty enum declarations (#281)
  • Don't crash on unusual line separators (#201)