Skip to content

Commit e6bb6d0

Browse files
authored
Update eclipse versions to 2023-03 (#1662)
2 parents 7d5507f + 7e852e3 commit e6bb6d0

File tree

9 files changed

+72
-61
lines changed

9 files changed

+72
-61
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
2121
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
2222
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
2323
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
24+
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
25+
* JDT and GrEclipse `4.26` -> `4.27`
26+
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
27+
* CDT `11.0` -> `11.1`
2428

2529
## [2.37.0] - 2023-03-13
2630
### Added

lib-extra/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ tasks.withType(Test).configureEach {
4040
}
4141

4242
def NEEDS_P2_DEPS = [
43-
'jdt',
43+
// (alphabetic order please)
44+
'cdt',
4445
'groovy',
45-
'cdt'
46+
'jdt'
4647
]
4748
for (needsP2 in NEEDS_P2_DEPS) {
4849
sourceSets.register(needsP2) {
@@ -68,9 +69,11 @@ tasks.withType(Test).configureEach {
6869

6970
apply plugin: 'dev.equo.p2deps'
7071
p2deps {
71-
into 'jdtCompileOnly', {
72+
// (alphabetic order please)
73+
into 'cdtCompileOnly', {
7274
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
73-
install 'org.eclipse.jdt.core'
75+
p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/'
76+
install 'org.eclipse.cdt.core'
7477
}
7578
into 'groovyCompileOnly', {
7679
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
@@ -80,10 +83,9 @@ p2deps {
8083
install 'org.eclipse.jdt.groovy.core'
8184
install 'org.codehaus.groovy'
8285
}
83-
into 'cdtCompileOnly', {
86+
into 'jdtCompileOnly', {
8487
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
85-
p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/'
86-
install 'org.eclipse.cdt.core'
88+
install 'org.eclipse.jdt.core'
8789
}
8890
}
8991

lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public final class EclipseCdtFormatterStep {
3737
private EclipseCdtFormatterStep() {}
3838

3939
private static final String NAME = "eclipse cdt formatter";
40-
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "10.7").add(17, "11.0");
40+
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "10.7").add(17, "11.1");
4141

4242
public static String defaultVersion() {
4343
return JVM_SUPPORT.getRecommendedFormatterVersion();

lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class GrEclipseFormatterStep {
3232
private GrEclipseFormatterStep() {}
3333

3434
private static final String NAME = "eclipse groovy formatter";
35-
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "4.26");
35+
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "4.26").add(17, "4.27");
3636

3737
public static String defaultVersion() {
3838
return JVM_SUPPORT.getRecommendedFormatterVersion();

lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public final class EclipseJdtFormatterStep {
3131
private EclipseJdtFormatterStep() {}
3232

3333
private static final String NAME = "eclipse jdt formatter";
34-
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "4.26");
34+
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "4.26").add(17, "4.27");
3535

3636
public static String defaultVersion() {
3737
return JVM_SUPPORT.getRecommendedFormatterVersion();

lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepSpecialCaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class GrEclipseFormatterStepSpecialCaseTest {
3030
*/
3131
@Test
3232
public void issue_1657() {
33-
Assertions.assertThrows(IllegalArgumentException.class, () -> {
33+
Assertions.assertThrows(RuntimeException.class, () -> {
3434
StepHarness.forStep(GrEclipseFormatterStep.createBuilder(TestProvisioner.mavenCentral()).build())
3535
.testResourceUnaffected("groovy/greclipse/format/SomeClass.test");
3636
});

lib/build.gradle

Lines changed: 47 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ apply from: rootProject.file('gradle/java-setup.gradle')
88
apply from: rootProject.file('gradle/java-publish.gradle')
99

1010
def NEEDS_GLUE = [
11-
'sortPom',
12-
'palantirJavaFormat',
11+
// (alphabetic order please)
12+
'cleanthat',
13+
'diktat',
14+
'flexmark',
15+
'gherkin',
1316
'googleJavaFormat',
17+
'gson',
18+
'jackson',
1419
'ktfmt',
1520
'ktlint',
16-
'flexmark',
17-
'diktat',
21+
'palantirJavaFormat',
1822
'scalafmt',
19-
'jackson',
20-
'gson',
21-
'cleanthat',
22-
'gherkin'
23+
'sortPom'
2324
]
2425
for (glue in NEEDS_GLUE) {
2526
sourceSets.register(glue) {
@@ -31,6 +32,13 @@ for (glue in NEEDS_GLUE) {
3132

3233
versionCompatibility {
3334
adapters {
35+
// (alphabetic order please)
36+
namespaces.register('Cleanthat') {
37+
versions = [
38+
'2.1',
39+
]
40+
targetSourceSetName = 'cleanthat'
41+
}
3442
namespaces.register('KtLint') {
3543
// as discussed at https://github.com/diffplug/spotless/pull/1475
3644
// we will support no more than 2 breaking changes at a time = 3 incompatible versions
@@ -42,12 +50,6 @@ versionCompatibility {
4250
]
4351
targetSourceSetName = 'ktlint'
4452
}
45-
namespaces.register('Cleanthat') {
46-
versions = [
47-
'2.1',
48-
]
49-
targetSourceSetName = 'cleanthat'
50-
}
5153
}
5254
}
5355

@@ -66,33 +68,39 @@ dependencies {
6668
testCommonImplementation "org.assertj:assertj-core:$VER_ASSERTJ"
6769
testCommonImplementation "com.diffplug.durian:durian-testlib:$VER_DURIAN"
6870

69-
// used for pom sorting
70-
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
71-
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0'
72-
73-
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
74-
75-
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0' // minimum required version due to api changes before then
76-
77-
// used jackson-based formatters
78-
jacksonCompileOnly 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
79-
jacksonCompileOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2'
80-
81-
String VER_KTFMT = '0.43'
82-
ktfmtCompileOnly "com.facebook:ktfmt:$VER_KTFMT"
83-
String VER_KTLINT_GOOGLE_JAVA_FORMAT = '1.7' // for JDK 8 compatibility
71+
// GLUE CODE (alphabetic order please)
72+
// cleanthat
73+
String VER_CLEANTHAT='2.13'
74+
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
75+
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
76+
// diktat
77+
diktatCompileOnly 'org.cqfn.diktat:diktat-rules:1.2.5'
78+
// flexmark
79+
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0'
80+
// gherkin
81+
gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2'
82+
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0'
83+
// googleJavaFormat
84+
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0'
85+
// gson
86+
gsonCompileOnly 'com.google.code.gson:gson:2.10.1'
87+
// jackson
88+
String VER_JACKSON='2.14.2'
89+
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
90+
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
91+
// ktfmt
92+
ktfmtCompileOnly "com.facebook:ktfmt:0.43"
8493
ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") {
8594
version {
86-
strictly VER_KTLINT_GOOGLE_JAVA_FORMAT
95+
strictly '1.7' // for JDK 8 compatibility
8796
}
8897
}
89-
98+
// ktlint
9099
String VER_KTLINT='0.46.1'
91100
ktlintCompileOnly "com.pinterest:ktlint:$VER_KTLINT"
92101
ktlintCompileOnly "com.pinterest.ktlint:ktlint-core:$VER_KTLINT"
93102
ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT"
94103
ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT"
95-
96104
compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.46.0'
97105
compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0'
98106
compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0'
@@ -102,24 +110,13 @@ dependencies {
102110
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-core:0.48.0'
103111
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
104112
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0'
105-
106-
String VER_SCALAFMT="3.7.3"
107-
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:$VER_SCALAFMT"
108-
109-
String VER_DIKTAT = "1.2.5"
110-
diktatCompileOnly "org.cqfn.diktat:diktat-rules:$VER_DIKTAT"
111-
112-
// used for markdown formatting
113-
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0'
114-
115-
gsonCompileOnly 'com.google.code.gson:gson:2.10.1'
116-
117-
String VER_CLEANTHAT="2.13"
118-
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
119-
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
120-
121-
gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2'
122-
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0'
113+
// palantirJavaFormat
114+
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
115+
// scalafmt
116+
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.7.3"
117+
// sortPom
118+
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
119+
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0'
123120
}
124121

125122
// we'll hold the core lib to a high standard

plugin-gradle/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
2626
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
2727
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
2828
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
29+
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
30+
* JDT and GrEclipse `4.26` -> `4.27`
31+
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
32+
* CDT `11.0` -> `11.1`
2933

3034
## [6.17.0] - 2023-03-13
3135
### Added

plugin-maven/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1616
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
1717
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
1818
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
19+
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
20+
* JDT and GrEclipse `4.26` -> `4.27`
21+
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
22+
* CDT `11.0` -> `11.1`
1923

2024
## [2.35.0] - 2023-03-13
2125
### Added

0 commit comments

Comments
 (0)