Skip to content

Commit

Permalink
Update eclipse versions to 2023-03 (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Apr 6, 2023
2 parents 7d5507f + 7e852e3 commit e6bb6d0
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 61 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
* JDT and GrEclipse `4.26` -> `4.27`
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
* CDT `11.0` -> `11.1`

## [2.37.0] - 2023-03-13
### Added
Expand Down
16 changes: 9 additions & 7 deletions lib-extra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ tasks.withType(Test).configureEach {
}

def NEEDS_P2_DEPS = [
'jdt',
// (alphabetic order please)
'cdt',
'groovy',
'cdt'
'jdt'
]
for (needsP2 in NEEDS_P2_DEPS) {
sourceSets.register(needsP2) {
Expand All @@ -68,9 +69,11 @@ tasks.withType(Test).configureEach {

apply plugin: 'dev.equo.p2deps'
p2deps {
into 'jdtCompileOnly', {
// (alphabetic order please)
into 'cdtCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
install 'org.eclipse.jdt.core'
p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/'
install 'org.eclipse.cdt.core'
}
into 'groovyCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
Expand All @@ -80,10 +83,9 @@ p2deps {
install 'org.eclipse.jdt.groovy.core'
install 'org.codehaus.groovy'
}
into 'cdtCompileOnly', {
into 'jdtCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/'
install 'org.eclipse.cdt.core'
install 'org.eclipse.jdt.core'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class EclipseCdtFormatterStep {
private EclipseCdtFormatterStep() {}

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

public static String defaultVersion() {
return JVM_SUPPORT.getRecommendedFormatterVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class GrEclipseFormatterStep {
private GrEclipseFormatterStep() {}

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

public static String defaultVersion() {
return JVM_SUPPORT.getRecommendedFormatterVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class EclipseJdtFormatterStep {
private EclipseJdtFormatterStep() {}

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

public static String defaultVersion() {
return JVM_SUPPORT.getRecommendedFormatterVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GrEclipseFormatterStepSpecialCaseTest {
*/
@Test
public void issue_1657() {
Assertions.assertThrows(IllegalArgumentException.class, () -> {
Assertions.assertThrows(RuntimeException.class, () -> {
StepHarness.forStep(GrEclipseFormatterStep.createBuilder(TestProvisioner.mavenCentral()).build())
.testResourceUnaffected("groovy/greclipse/format/SomeClass.test");
});
Expand Down
97 changes: 47 additions & 50 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ apply from: rootProject.file('gradle/java-setup.gradle')
apply from: rootProject.file('gradle/java-publish.gradle')

def NEEDS_GLUE = [
'sortPom',
'palantirJavaFormat',
// (alphabetic order please)
'cleanthat',
'diktat',
'flexmark',
'gherkin',
'googleJavaFormat',
'gson',
'jackson',
'ktfmt',
'ktlint',
'flexmark',
'diktat',
'palantirJavaFormat',
'scalafmt',
'jackson',
'gson',
'cleanthat',
'gherkin'
'sortPom'
]
for (glue in NEEDS_GLUE) {
sourceSets.register(glue) {
Expand All @@ -31,6 +32,13 @@ for (glue in NEEDS_GLUE) {

versionCompatibility {
adapters {
// (alphabetic order please)
namespaces.register('Cleanthat') {
versions = [
'2.1',
]
targetSourceSetName = 'cleanthat'
}
namespaces.register('KtLint') {
// as discussed at https://github.com/diffplug/spotless/pull/1475
// we will support no more than 2 breaking changes at a time = 3 incompatible versions
Expand All @@ -42,12 +50,6 @@ versionCompatibility {
]
targetSourceSetName = 'ktlint'
}
namespaces.register('Cleanthat') {
versions = [
'2.1',
]
targetSourceSetName = 'cleanthat'
}
}
}

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

// used for pom sorting
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0'

palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm

googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0' // minimum required version due to api changes before then

// used jackson-based formatters
jacksonCompileOnly 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
jacksonCompileOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2'

String VER_KTFMT = '0.43'
ktfmtCompileOnly "com.facebook:ktfmt:$VER_KTFMT"
String VER_KTLINT_GOOGLE_JAVA_FORMAT = '1.7' // for JDK 8 compatibility
// GLUE CODE (alphabetic order please)
// cleanthat
String VER_CLEANTHAT='2.13'
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
// diktat
diktatCompileOnly 'org.cqfn.diktat:diktat-rules:1.2.5'
// flexmark
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0'
// gherkin
gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2'
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0'
// googleJavaFormat
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.16.0'
// gson
gsonCompileOnly 'com.google.code.gson:gson:2.10.1'
// jackson
String VER_JACKSON='2.14.2'
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
// ktfmt
ktfmtCompileOnly "com.facebook:ktfmt:0.43"
ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") {
version {
strictly VER_KTLINT_GOOGLE_JAVA_FORMAT
strictly '1.7' // for JDK 8 compatibility
}
}

// ktlint
String VER_KTLINT='0.46.1'
ktlintCompileOnly "com.pinterest:ktlint:$VER_KTLINT"
ktlintCompileOnly "com.pinterest.ktlint:ktlint-core:$VER_KTLINT"
ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-experimental:$VER_KTLINT"
ktlintCompileOnly "com.pinterest.ktlint:ktlint-ruleset-standard:$VER_KTLINT"

compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.46.0'
compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.46.0'
compatKtLint0Dot46Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.46.0'
Expand All @@ -102,24 +110,13 @@ dependencies {
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-core:0.48.0'
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0'

String VER_SCALAFMT="3.7.3"
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:$VER_SCALAFMT"

String VER_DIKTAT = "1.2.5"
diktatCompileOnly "org.cqfn.diktat:diktat-rules:$VER_DIKTAT"

// used for markdown formatting
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.0'

gsonCompileOnly 'com.google.code.gson:gson:2.10.1'

String VER_CLEANTHAT="2.13"
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"

gherkinCompileOnly 'io.cucumber:gherkin-utils:8.0.2'
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0'
// palantirJavaFormat
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
// scalafmt
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.7.3"
// sortPom
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:3.0.0'
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.0'
}

// we'll hold the core lib to a high standard
Expand Down
4 changes: 4 additions & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
* JDT and GrEclipse `4.26` -> `4.27`
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
* CDT `11.0` -> `11.1`

## [6.17.0] - 2023-03-13
### Added
Expand Down
4 changes: 4 additions & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `flexmark` version `0.62.2` -> `0.64.0`. ([#1302](https://github.com/diffplug/spotless/pull/1302))
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
* Bump default `scalafmt` version `3.7.1` -> `3.7.3`. ([#1584](https://github.com/diffplug/spotless/pull/1584))
* Bump default Eclipse formatters for the 2023-03 release. ([#1662](https://github.com/diffplug/spotless/pull/1662))
* JDT and GrEclipse `4.26` -> `4.27`
* Improve GrEclipse error reporting. ([#1660](https://github.com/diffplug/spotless/pull/1660))
* CDT `11.0` -> `11.1`

## [2.35.0] - 2023-03-13
### Added
Expand Down

0 comments on commit e6bb6d0

Please sign in to comment.