Skip to content

Use google-java-format version 1.34.0 - #289

Closed
mernst wants to merge 2 commits into
plume-lib:mainfrom
mernst:gjf-1340
Closed

mernst wants to merge 2 commits into
plume-lib:mainfrom
mernst:gjf-1340

Conversation

@mernst

@mernst mernst commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Mar 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updated the Gradle version catalog entry for google-java-format from version 1.33.0 to 1.34.0.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gradle/libs.versions.toml`:
- Line 15: Update the Spotless configuration’s googleJavaFormat(...) setup to
explicitly pass version 1.34.0, reusing the google-java-format version catalog
alias where supported, so Spotless does not rely on its internal default. Keep
the existing formatter configuration unchanged otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 850e7322-4d89-4b0a-b810-6f982518ee30

📥 Commits

Reviewing files that changed from the base of the PR and between e9eb92f and 350a30e.

📒 Files selected for processing (1)
  • gradle/libs.versions.toml

Comment thread gradle/libs.versions.toml
error-prone-core = "com.google.errorprone:error_prone_core:2.50.0"

google-java-format = "com.google.googlejavaformat:google-java-format:1.33.0"
google-java-format = "com.google.googlejavaformat:google-java-format:1.34.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repo files =="
git ls-files | rg '(^|/)(build\.gradle|build\.gradle\.kts|gradle\.properties|gradle/libs\.versions\.toml)$' || true

echo
echo "== libs.versions.toml context =="
if [ -f gradle/libs.versions.toml ]; then
  nl -ba gradle/libs.versions.toml | sed -n '1,80p'
fi

echo
echo "== build files with spotless/google-java-format references =="
rg -n "spotless|googleJavaFormat|google-java-format|libs\.google-java-format" -S . || true

echo
echo "== relevant build snippets =="
for f in $(git ls-files | rg '(^|/)(build\.gradle|build\.gradle\.kts|settings\.gradle|settings\.gradle\.kts)(\.kts)?$'); do
  echo "--- $f ---"
  nl -ba "$f" | sed -n '1,220p'
done

Repository: plume-lib/merging

Length of output: 304


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== libs.versions.toml context =="
if [ -f gradle/libs.versions.toml ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' gradle/libs.versions.toml | sed -n '1,80p'
fi

echo
echo "== build.gradle context =="
if [ -f build.gradle ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' build.gradle | sed -n '1,220p'
fi

echo
echo "== settings.gradle context, if present =="
if [ -f settings.gradle ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' settings.gradle | sed -n '1,120p'
fi

echo
echo "== plugin and formatter declarations =="
rg -n "spotless|googleJavaFormat|google-java-format|libs\.google-java-format|com\.diffplug\.gradle|plugins \{" -S . || true

Repository: plume-lib/merging

Length of output: 13055


🌐 Web query:

Spotless Gradle googleJavaFormat default version google-java-format

💡 Result:

The default version of google-java-format used by the Spotless Gradle plugin is determined dynamically based on your JVM version [1][2]. As of July 2026, for users running on JVM 17, the default version is 1.28.0 [1][2]. Spotless manages this via an internal dependency management system [1]. While the plugin provides a recommended default, you can explicitly override the version in your build configuration [3][2]: spotless { java { // Overriding the default version googleJavaFormat('1.28.0') } } The plugin also supports additional configurations such as using the AOSP style, reflowing long strings, and toggling Javadoc formatting [3][2]: spotless { java { googleJavaFormat('1.28.0').aosp.reflowLongStrings.formatJavadoc(false) } } If you are using different JVM versions, the minimum required version may vary; for instance, Java 21 requires at least version 1.17.0 [1][2]. The plugin's maintainers regularly update these default versions to match the latest available releases of google-java-format [4].

Citations:


🌐 Web query:

Spotless 8.9.0 google-java-provider googleJavaFormat version 1.34.0 README

💡 Result:

In Spotless 8.9.0, the google-java-format version is not hardcoded to 1.34.0 as a default. Instead, Spotless allows users to specify the version they wish to use in their build configuration [1][2]. For google-java-format, the default version provided by Spotless is managed internally and may update across releases [3]. As of the release of Spotless 8.9.0 (dated July 27, 2026), you can explicitly override the version to 1.34.0 or any other compatible version in your build.gradle or pom.xml [1][2]. To use a specific version (such as 1.34.0) in Gradle, you would use the following configuration in your spotless block [1][2]: spotless { java { googleJavaFormat('1.34.0') } } The google-java-format version 1.34.0 was released on February 3, 2026 [4], and it includes support for Java 25 Instance Main Methods [5]. Users are encouraged to check the official Spotless CHANGES.md and the google-java-format release notes for details on compatibility and new features [6][7].

Citations:


Configure Spotless to use 1.34.0 explicitly.

google-java-format = "1.34.0" only updates the project dependency alias; Spotless still uses its internal default formatter version unless the version is passed via googleJavaFormat(...).

Proposed fix
-    googleJavaFormat()
+    googleJavaFormat("1.34.0")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gradle/libs.versions.toml` at line 15, Update the Spotless configuration’s
googleJavaFormat(...) setup to explicitly pass version 1.34.0, reusing the
google-java-format version catalog alias where supported, so Spotless does not
rely on its internal default. Keep the existing formatter configuration
unchanged otherwise.

Source: MCP tools

@mernst mernst closed this Jul 28, 2026
@mernst
mernst deleted the gjf-1340 branch July 28, 2026 21:49
@coderabbitai coderabbitai Bot mentioned this pull request Aug 7, 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