Skip to content

Commit 4f191a6

Browse files
petertrrclaude
andauthored
Track Eclipse JDT Formatter version with Renovate (#108)
Add a regex manager to detect updates for the Eclipse JDT Formatter version used in Spotless configuration (`eclipse("4.22")`), using the `org.eclipse.platform:org.eclipse.platform` Maven artifact as the version source. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7627794 commit 4f191a6

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/renovate.json5

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@
99
"rebaseWhen": "conflicted",
1010
"enabledManagers": [
1111
"gradle",
12-
"gradle-wrapper"
12+
"gradle-wrapper",
13+
"regex"
1314
],
1415
"gradle": {
1516
"enabled": true
1617
},
18+
"regexManagers": [
19+
{
20+
// Tracks the Eclipse JDT Formatter version used by Spotless (e.g. eclipse("4.22")).
21+
// The version string follows Eclipse release numbering (4.x), matched against
22+
// org.eclipse.platform:org.eclipse.platform on Maven Central (which publishes as 4.x.0).
23+
// extractVersion in packageRules below strips the trailing .0 to align the formats.
24+
"fileMatch": ["\\.gradle\\.kts$"],
25+
"matchStrings": [
26+
"eclipse\\(\"(?<currentValue>[^\"]+)\"\\)"
27+
],
28+
"depNameTemplate": "org.eclipse.platform:org.eclipse.platform",
29+
"datasourceTemplate": "maven"
30+
}
31+
],
1732
"packageRules": [
1833
{
1934
"matchManagers": [
@@ -26,6 +41,14 @@
2641
"groupName": "all non-major dependencies",
2742
"groupSlug": "all-minor-patch"
2843
},
44+
{
45+
"matchPackageNames": [
46+
"org.eclipse.platform:org.eclipse.platform"
47+
],
48+
// Spotless accepts "4.22.0" but deprecates it in favour of "4.22", printing a warning.
49+
// Strip the patch segment to keep the format consistent with what is already in the code.
50+
"extractVersion": "^(?<version>\\d+\\.\\d+)" // 4.22.0 → 4.22
51+
},
2952
{
3053
"matchPackageNames": [
3154
"com.gradle.develocity",

0 commit comments

Comments
 (0)