Upgrade com.diffplug.spotless 6.2.1 -> 7.2.1 (google-java-format pinned to 1.13.0) - #202
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Upgrade com.diffplug.spotless 6.2.1 -> 7.2.1 (google-java-format pinned to 1.13.0)#202devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades only the Spotless Gradle plugin. The formatter itself is pinned to the version Spotless 6.2.1 resolves today, so formatting output is byte-identical and no
.javafile changes.plugins { - id "com.diffplug.spotless" version "6.2.1" + id "com.diffplug.spotless" version "7.2.1" } spotless { java { - googleJavaFormat() + googleJavaFormat('1.13.0') } }Diff is
build.gradleonly — 2 lines.Why 7.2.1 and not 6.25.0
The assignment suggested 6.25.0 on the assumption that Spotless 7.x needs Gradle 8+. Verified upstream and empirically, that is not the case:
plugin-gradle/README.md: "Spotless requires JRE 11+ and Gradle 6.1.1 or newer."7.3and required Java to17" — Java 17 is out of bounds for this repo (Java 11 ceiling), so 7.2.1 is the newest usable release.spotlessApply,spotlessCheckand the full gate — all green.Why the formatter is pinned
Spotless 6.2.1's default
google-java-formatis1.13.0(confirmed empirically:javap -con the cachedspotless-lib-2.22.1.jarGoogleJavaFormatStepshows the constant1.13.0, and the Gradle cache contains onlygoogle-java-format/1.13.0). Spotless 7.2.1's default would be1.24.0, which reformats the whole source tree. PinninggoogleJavaFormat('1.13.0')keeps the output identical while parallel upgrade PRs are open against this repo. A follow-up PR can drop the pin and adopt the newer google-java-format once those have merged (note: gjf 1.25+ requires Java 17, so the follow-up is bounded by the Java 11 ceiling too).API migration
No source changes needed. The plugin is build-time only; the
spotless { java { ... } }DSL used here (target,googleJavaFormat) is unchanged in 7.x, and pinning the formatter version means the format itself did not move.Version resolution evidence
(The plugin resolves on the buildscript classpath, not
runtimeClasspath/testRuntimeClasspath, sobuildEnvironmentis the applicable insight command; the Spring Boot BOM does not manage it.)Source-clean check:
Negative control —
spotlessCheckstill enforces under 7.2.1 (appended a deliberately misformatted class toUtil.java, ran the check, reverted):Gate
Baseline recorded on untouched
main(commit 3037fa5) with the same command:BUILD SUCCESSFUL, tests 68, failures 0, errors 0, skipped 0. Equal test count, zero new failures.Pre-existing on base, not addressed here
jacocoTestCoverageVerificationfails onmainat ~0.33 instruction coverage against the 0.80 rule inbuild.gradle. CI excludes it (./gradlew clean test -x jacocoTestCoverageVerification) and so does the gate above. Threshold untouched, no tests added to game it.spotlessJava"Execution optimizations have been disabled … uses this output of task ':compileJava' without declaring an explicit or implicit dependency" warnings are present onmainbefore this change as well (aproject.fileTree(rootDir)target that overlapsbuild/); unchanged by the upgrade and out of scope.src/test/java/io/spring/selenium) run under the separateseleniumTestTestNG task and are not part of the gate.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/84fae1c4ce184c728f3a79f548562af9
Requested by: @mbatchelor81