Skip to content

Commit ad78bc6

Browse files
committed
Merge branch 'main' into FromFileToPath
2 parents 9adce64 + 5bef415 commit ad78bc6

File tree

119 files changed

+2926
-1662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2926
-1662
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
* text eol=lf
2+
*.bat eol=crlf
23
*.png binary
34
*.jar binary

.github/workflows/changelog-print.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
with:
1616
java-version: 11
1717
distribution: 'temurin'
18-
cache: 'gradle'
1918
- name: gradle caching
2019
uses: gradle/gradle-build-action@v2
20+
with:
21+
gradle-home-cache-cleanup: true
2122
- run: ./gradlew changelogPrint

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ jobs:
2626
with:
2727
distribution: "temurin"
2828
java-version: 11
29-
cache: gradle
29+
- name: gradle caching
30+
uses: gradle/gradle-build-action@v2
31+
with:
32+
gradle-home-cache-cleanup: true
3033
- name: spotlessCheck
3134
run: ./gradlew spotlessCheck --build-cache
3235
- name: assemble testClasses
@@ -37,19 +40,19 @@ jobs:
3740
fail-fast: false
3841
matrix:
3942
kind: [maven, gradle]
40-
jre: [8, 11, 17]
43+
jre: [11, 17]
4144
os: [ubuntu-latest]
4245
include:
4346
# test windows at the diagonals of the above matrix
4447
- kind: maven
45-
jre: 8
48+
jre: 11
4649
os: windows-latest
4750
- kind: gradle
4851
jre: 17
4952
os: windows-latest
5053
# npm on linux only (crazy slow on windows)
5154
- kind: npm
52-
jre: 8
55+
jre: 11
5356
os: ubuntu-latest
5457
runs-on: ${{ matrix.os }}
5558
steps:
@@ -60,7 +63,10 @@ jobs:
6063
with:
6164
distribution: "temurin"
6265
java-version: ${{ matrix.jre }}
63-
cache: gradle
66+
- name: gradle caching
67+
uses: gradle/gradle-build-action@v2
68+
with:
69+
gradle-home-cache-cleanup: true
6470
- name: build (maven-only)
6571
if: matrix.kind == 'maven'
6672
run: ./gradlew :plugin-maven:build -x spotlessCheck --build-cache

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ jobs:
4242
with:
4343
java-version: 11
4444
distribution: 'temurin'
45-
cache: 'gradle'
4645
- name: gradle caching
4746
uses: gradle/gradle-build-action@v2
47+
with:
48+
gradle-home-cache-cleanup: true
49+
- name: git fetch origin main
50+
run: git fetch origin main
4851
- name: publish all
4952
if: "${{ github.event.inputs.to_publish == 'all' }}"
5053
run: |

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: "Validate Gradle Wrapper"
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
paths:
5+
- 'gradlew'
6+
- 'gradlew.bat'
7+
- 'gradle/wrapper/'
8+
pull_request:
9+
paths:
10+
- 'gradlew'
11+
- 'gradlew.bat'
12+
- 'gradle/wrapper/'
313

414
permissions:
515
contents: read

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,26 @@ This document is intended for Spotless developers.
1010
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
1111

1212
## [Unreleased]
13+
14+
## [2.33.0] - 2023-01-26
1315
### Added
1416
* `ProcessRunner` has added some convenience methods so it can be used for maven testing. ([#1496](https://github.com/diffplug/spotless/pull/1496))
17+
* `ProcessRunner` allows to limit captured output to a certain number of bytes. ([#1511](https://github.com/diffplug/spotless/pull/1511))
18+
* `ProcessRunner` is now capable of handling long-running tasks where waiting for exit is delegated to the caller. ([#1511](https://github.com/diffplug/spotless/pull/1511))
19+
* Allow to specify node executable for node-based formatters using `nodeExecutable` parameter ([#1500](https://github.com/diffplug/spotless/pull/1500))
1520
### Fixed
1621
* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494)
1722
### Changes
23+
* **POTENTIALLY BREAKING** Bump minimum JRE from 8 to 11, next release likely to bump bytecode to Java 11 ([#1514](https://github.com/diffplug/spotless/pull/1514) part 1 of [#1337](https://github.com/diffplug/spotless/issues/1337))
24+
* Rename `YamlJacksonStep` into `JacksonYamlStep` while normalizing Jackson usage ([#1492](https://github.com/diffplug/spotless/pull/1492))
25+
* Convert `gson` integration to use a compile-only source set ([#1510](https://github.com/diffplug/spotless/pull/1510)).
26+
* ** POTENTIALLY BREAKING** Removed support for KtLint 0.3x and 0.45.2 ([#1475](https://github.com/diffplug/spotless/pull/1475))
27+
* `KtLint` does not maintain a stable API - before this PR, we supported every breaking change in the API since 2019.
28+
* From now on, we will support no more than 2 breaking changes at a time.
29+
* NpmFormatterStepStateBase delays `npm install` call until the formatter is first used. This enables better integration
30+
with `gradle-node-plugin`. ([#1522](https://github.com/diffplug/spotless/pull/1522))
31+
* Bump default `ktlint` version to latest `0.48.1` -> `0.48.2` ([#1529](https://github.com/diffplug/spotless/pull/1529))
32+
* Bump default `scalafmt` version to latest `3.6.1` -> `3.7.1` ([#1529](https://github.com/diffplug/spotless/pull/1529))
1833

1934
## [2.32.0] - 2023-01-13
2035
### Added

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ lib('java.RemoveUnusedImportsStep') +'{{yes}} | {{yes}}
6363
extra('java.EclipseJdtFormatterStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
6464
lib('java.FormatAnnotationsStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
6565
lib('json.gson.GsonStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
66+
lib('json.JacksonJsonStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
6667
lib('json.JsonSimpleStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
6768
lib('kotlin.KtLintStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
6869
lib('kotlin.KtfmtStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
@@ -77,7 +78,7 @@ lib('python.BlackStep') +'{{yes}} | {{no}}
7778
lib('scala.ScalaFmtStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
7879
lib('sql.DBeaverSQLFormatterStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
7980
extra('wtp.EclipseWtpFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
80-
lib('yaml.YamlJacksonStep') +'{{no}} | {{yes}} | {{no}} | {{no}} |',
81+
lib('yaml.JacksonYamlStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
8182
'| [(Your FormatterStep here)](CONTRIBUTING.md#how-to-add-a-new-formatterstep) | {{no}} | {{no}} | {{no}} | {{no}} |',
8283
].join('\n');
8384
-->
@@ -109,6 +110,7 @@ lib('yaml.YamlJacksonStep') +'{{no}} | {{yes}}
109110
| [`java.EclipseJdtFormatterStep`](lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
110111
| [`java.FormatAnnotationsStep`](lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
111112
| [`json.gson.GsonStep`](lib/src/main/java/com/diffplug/spotless/json/gson/GsonStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
113+
| [`json.JacksonJsonStep`](lib/src/main/java/com/diffplug/spotless/json/JacksonJsonStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
112114
| [`json.JsonSimpleStep`](lib/src/main/java/com/diffplug/spotless/json/JsonSimpleStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
113115
| [`kotlin.KtLintStep`](lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
114116
| [`kotlin.KtfmtStep`](lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
@@ -123,7 +125,7 @@ lib('yaml.YamlJacksonStep') +'{{no}} | {{yes}}
123125
| [`scala.ScalaFmtStep`](lib/src/main/java/com/diffplug/spotless/scala/ScalaFmtStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
124126
| [`sql.DBeaverSQLFormatterStep`](lib/src/main/java/com/diffplug/spotless/sql/DBeaverSQLFormatterStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
125127
| [`wtp.EclipseWtpFormatterStep`](lib-extra/src/main/java/com/diffplug/spotless/extra/wtp/EclipseWtpFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
126-
| [`yaml.YamlJacksonStep`](lib/src/main/java/com/diffplug/spotless/yaml/YamlJacksonStep.java) | :white_large_square: | :+1: | :white_large_square: | :white_large_square: |
128+
| [`yaml.JacksonYamlStep`](lib/src/main/java/com/diffplug/spotless/yaml/JacksonYamlStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
127129
| [(Your FormatterStep here)](CONTRIBUTING.md#how-to-add-a-new-formatterstep) | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: |
128130
<!---freshmark /matrix -->
129131

_ext/eclipse-wtp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ sourceSets {
100100
* All test classes need to run separately since they all instatiate different setups of the
101101
* Eclipse framework.
102102
*/
103-
test {
103+
tasks.withType(Test).configureEach {
104104
//Skip default tests, which would run every test case.
105105
exclude '**'
106106
}

_ext/gradle/java-setup.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ apply from: rootProject.file('gradle/java-setup.gradle')
99
apply plugin: 'java-library'
1010

1111
// Show warning locations, fail on warnings
12-
tasks.withType(JavaCompile) {
12+
tasks.withType(JavaCompile).configureEach {
1313
options.compilerArgs << "-Xlint:unchecked"
1414
options.compilerArgs << "-Xlint:deprecation"
1515
options.compilerArgs << "-Werror"
@@ -22,4 +22,6 @@ dependencies {
2222
testImplementation project(':testlib')
2323
}
2424

25-
test { useJUnitPlatform() }
25+
tasks.withType(Test).configureEach {
26+
useJUnitPlatform()
27+
}

_ext/gradle/update-lockfile.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Use file locking
2-
configurations.all {
2+
configurations.configureEach {
33
resolutionStrategy {
44
activateDependencyLocking()
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)