Skip to content

build(deps): bump com.google.googlejavaformat:google-java-format from 1.28.0 to 2.0.0 - #446

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/gradle/com.google.googlejavaformat-google-java-format-2.0.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/gradle/com.google.googlejavaformat-google-java-format-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Bumps com.google.googlejavaformat:google-java-format from 1.28.0 to 2.0.0.

Release notes

Sourced from com.google.googlejavaformat:google-java-format's releases.

v2.0.0

google-java-format 2.0.0 replaces the formatter's layout engine, and makes some improvements to lambda formatting (#19). This release also adds an optional cleanup pass that makes small non-whitespace changes, which is enabled by default.

Because of these changes, 2.0.0 reformats more existing code than a typical release. We recommend reformatting your codebase in a single commit when upgrading.

Formatting changes

  • A lambda that is the only argument of a call is now kept on the same line as the call, instead of starting on a new line with an extra level of indentation (#19):

    executor.submit(() -> {
      doSomething();
    });
  • Text blocks are now indented as part of the main formatting pass, so their indentation is correct even with --skip-reflowing-long-strings.

  • Fixed indentation of comments after assert, enum constants, for initializers, try resources, multi-catch clauses, and type arguments.

Cleanups

  • Added a --cleanup flag, enabled by default, for small non-whitespace changes:

    • removing redundant semicolons
    • removing empty annotation parentheses (@Foo() → @Foo)
    • removing parentheses around a single untyped lambda parameter ((x) -> ... → x -> ...) (#762)

    Cleanups only apply to the ranges being formatted. Use --cleanup=false to only change whitespace (and the existing --skip-sorting-imports, --skip-removing-unused-imports, and --skip-reordering-modifiers flags for the other non-whitespace changes).

  • When formatting a range with --lines or --offset and cleanups enabled, unformatted statements outside the range are re-indented to match the formatted output, so an edit that adds or removes a level of nesting doesn't leave the surrounding code misaligned. Blank lines left behind by cleanups are removed.

Configuration

  • --max-line-length=N sets the column limit (default 100) (#425). (This flag was introduced in v1.37.0)

Language support

Javadoc

  • Strip trailing asterisks before */ (#67).
  • Preserve relative indentation in <pre>{@code ...} blocks without leading *.
  • Join hyphenated words broken across lines.

Long strings

  • When formatting a range with --lines or --offset, only long string literals in the requested range are reflowed (#1114).
  • Escaped backslashes (e.g. \\t in a Windows path or a regular expression) are no longer split when reflowing long string literals (#1186, #1253, #1439).
  • Failures while reflowing long strings are reported as errors instead of crashing or hanging the CLI (#1439).

Other fixes

... (truncated)

Commits
  • 246202f Release google-java-format 2.0.0
  • e01cd02 Only reflow long strings in the requested lines when partially formatting.
  • 7e4696d Don't split escaped backslashes when reflowing long string literals.
  • 7cfa88b Fix the flag name in the error for using --dry-run with --replace.
  • 044bbe6 Bundle commonmark in the Eclipse plugin.
  • 722d074 Report string wrapping failures without crashing or hanging the CLI.
  • 93bb96d Add tests demonstrating unclosed Javadoc inline tags leaving comments unforma...
  • 2980bad Join hyphenated words broken across lines in Javadoc comments.
  • 0452ffd Use text blocks for multi-line expected output in layout tests.
  • 0b3c742 Don't hug on the first line of statement headers that are followed by a body.
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Nov 6, 2026
Bumps [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format) from 1.28.0 to 2.0.0.
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](google/google-java-format@v1.28.0...v2.0.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/gradle/com.google.googlejavaformat-google-java-format-2.0.0 branch from 071501d to 3c6bab2 Compare November 7, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants