You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use gradle-buildconfig-plugin to generate dependency versions #2705
@renovate-bot send the updates like #2345, we have to update GoogleJavaFormatStep.java manually to reflect the latest version string. If we apply the build config stuff, the latest version in the lib will always be refed by
.add(17, BuildConfig.VERSION_GJF); // default version
and BuildConfig.VERSION_GJF always reflects the latest version bumped by @renovate-bot.
Hi, I would like to work on this. I reviewed current main now that #2704 has been merged, and the google-java-format defaults are now split by JVM compatibility.
Is the intended scope now to generate BuildConfig.VERSION_GJF from the version in libs.google.java.format and use it for the JVM 21+ recommended default, while keeping the JVM 17 default at 1.28.0 and the JVM 25 minimum at 1.30.0?
I would keep the dependency bump in #2706 outside this PR so the change remains focused on wiring the version catalog value into the generated build config.
Thanks! One concern: if only the Java 25 minimum uses BuildConfig.VERSION_GJF, while the Java 21+ default remains hardcoded to 1.30.0, a future Renovate update would make Spotless select 1.30.0 and then reject it for being below the new minimum.
Should both the Java 21+ default and the Java 25 minimum use BuildConfig.VERSION_GJF, while Java 17 remains on 1.28.0?
Activity
nedtwigg commentedon Nov 3, 2025
I'm not familiar with this, but I'm open to it. What is the problem that it solves?
Goooler commentedon Nov 4, 2025
@renovate-bot send the updates like #2345, we have to update
GoogleJavaFormatStep.javamanually to reflect the latest version string. If we apply the build config stuff, the latest version in the lib will always be refed byand
BuildConfig.VERSION_GJFalways reflects the latest version bumped by @renovate-bot.nedtwigg commentedon Nov 5, 2025
Wow! Great idea, I like it!
builtbyjuls commentedon Sep 8, 2026
Hi, I would like to work on this. I reviewed current
mainnow that #2704 has been merged, and the google-java-format defaults are now split by JVM compatibility.Is the intended scope now to generate
BuildConfig.VERSION_GJFfrom the version inlibs.google.java.formatand use it for the JVM 21+ recommended default, while keeping the JVM 17 default at1.28.0and the JVM 25 minimum at1.30.0?I would keep the dependency bump in #2706 outside this PR so the change remains focused on wiring the version catalog value into the generated build config.
Goooler commentedon Sep 8, 2026
addMin(25, BuildConfig.VERSION_GJF)forspotless/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java
Line 124 in 7bd31e1
Always ref the latest dependency version in the buildconfig
builtbyjuls commentedon Sep 8, 2026
Thanks! One concern: if only the Java 25 minimum uses
BuildConfig.VERSION_GJF, while the Java 21+ default remains hardcoded to1.30.0, a future Renovate update would make Spotless select1.30.0and then reject it for being below the new minimum.Should both the Java 21+ default and the Java 25 minimum use
BuildConfig.VERSION_GJF, while Java 17 remains on1.28.0?Goooler commentedon Sep 8, 2026
Good question! I was wrong. We should only replace
spotless/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java
Line 126 in 7bd31e1
addMin. That's the default one when users usegoogleJavaFormat.I filed this FR a long time ago and haven't contributed to this codebase for a while, so I missed some context!