Skip to content

Commit e1a9acb

Browse files
committed
Merge branch 'main' into feat/prepare-for-lint-take-2
2 parents 33444a7 + 7aac080 commit e1a9acb

File tree

131 files changed

+9415
-765
lines changed

Some content is hidden

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

131 files changed

+9415
-765
lines changed

.github/workflows/changelog-print.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ jobs:
1616
java-version: 11
1717
distribution: 'temurin'
1818
- name: gradle caching
19-
uses: gradle/actions/setup-gradle@v3
20-
with:
21-
gradle-home-cache-cleanup: true
19+
uses: gradle/actions/setup-gradle@v4
2220
- run: ./gradlew changelogPrint

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
distribution: "temurin"
3030
java-version: 11
3131
- name: gradle caching
32-
uses: gradle/actions/setup-gradle@v3
33-
with:
34-
gradle-home-cache-cleanup: true
32+
uses: gradle/actions/setup-gradle@v4
3533
- name: spotlessCheck
3634
run: ./gradlew spotlessCheck
3735
- name: assemble testClasses
@@ -43,7 +41,7 @@ jobs:
4341
matrix:
4442
kind: [maven, gradle]
4543
# Test on the latest Java version once Gradle & Maven support it.
46-
jre: [11, 17, 21]
44+
jre: [11, 17, 21, 22]
4745
os: [ubuntu-latest]
4846
include:
4947
# test windows at the diagonals of the above matrix
@@ -71,9 +69,7 @@ jobs:
7169
distribution: "temurin"
7270
java-version: ${{ matrix.jre }}
7371
- name: gradle caching
74-
uses: gradle/actions/setup-gradle@v3
75-
with:
76-
gradle-home-cache-cleanup: true
72+
uses: gradle/actions/setup-gradle@v4
7773
- name: build (maven-only)
7874
if: matrix.kind == 'maven'
7975
run: ./gradlew :plugin-maven:build -x spotlessCheck

.github/workflows/deploy.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# GH_TOKEN
21
# NEXUS_USER
32
# NEXUS_PASS64 (base64 NOTE: `base64` and `openssl base64` failed, had to use Java
43
# byte[] data = "{{password}}".getBytes(StandardCharsets.UTF_8);
@@ -29,8 +28,10 @@ jobs:
2928
build:
3029
runs-on: ubuntu-latest
3130
name: deploy
31+
permissions:
32+
contents: write
3233
env:
33-
gh_token: ${{ secrets.GH_TOKEN }}
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3435
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
3536
ORG_GRADLE_PROJECT_nexus_pass64: ${{ secrets.NEXUS_PASS64 }}
3637
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
@@ -43,9 +44,7 @@ jobs:
4344
java-version: 11
4445
distribution: 'temurin'
4546
- name: gradle caching
46-
uses: gradle/actions/setup-gradle@v3
47-
with:
48-
gradle-home-cache-cleanup: true
47+
uses: gradle/actions/setup-gradle@v4
4948
- name: git fetch origin main
5049
run: git fetch origin main
5150
- name: publish all

CHANGES.md

Lines changed: 65 additions & 26 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ concerning what you are working on:
162162

163163
```shell
164164
# Run only from test from the "lib" project
165-
gradlew :testlib:test --tests com.diffplug.spotless.generic.IndentStepTest
165+
./gradlew :testlib:test --tests com.diffplug.spotless.generic.IndentStepTest
166166

167167
# Run only one test from the "plugin-maven" project
168-
gradlew :plugin-maven:test --tests com.diffplug.spotless.maven.pom.SortPomMavenTest
168+
./gradlew :plugin-maven:test --tests com.diffplug.spotless.maven.pom.SortPomMavenTest
169169

170170
# Run only one test from the "plugin-gradle" project
171-
gradlew :plugin-gradle:test --tests com.diffplug.gradle.spotless.FreshMarkExtensionTest
171+
./gradlew :plugin-gradle:test --tests com.diffplug.gradle.spotless.FreshMarkExtensionTest
172172
```
173173

174174
## Check and format code

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ lib('npm.TsFmtFormatterStep') +'{{yes}} | {{yes}}
103103
lib('pom.SortPomStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
104104
lib('protobuf.BufStep') +'{{yes}} | {{no}} | {{no}} | {{no}} |',
105105
lib('python.BlackStep') +'{{yes}} | {{no}} | {{no}} | {{no}} |',
106+
lib('rdf.RdfFormatterStep') +'{{no}} | {{yes}} | {{no}} | {{no}} |',
106107
lib('scala.ScalaFmtStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
107108
lib('shell.ShfmtStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
108109
lib('sql.DBeaverSQLFormatterStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
@@ -157,6 +158,7 @@ lib('yaml.JacksonYamlStep') +'{{yes}} | {{yes}}
157158
| [`pom.SortPomStep`](lib/src/main/java/com/diffplug/spotless/pom/SortPomStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
158159
| [`protobuf.BufStep`](lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java) | :+1: | :white_large_square: | :white_large_square: | :white_large_square: |
159160
| [`python.BlackStep`](lib/src/main/java/com/diffplug/spotless/python/BlackStep.java) | :+1: | :white_large_square: | :white_large_square: | :white_large_square: |
161+
| [`rdf.RdfFormatterStep`](lib/src/main/java/com/diffplug/spotless/rdf/RdfFormatterStep.java) | :white_large_square: | :+1: | :white_large_square: | :white_large_square: |
160162
| [`scala.ScalaFmtStep`](lib/src/main/java/com/diffplug/spotless/scala/ScalaFmtStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
161163
| [`shell.ShfmtStep`](lib/src/main/java/com/diffplug/spotless/shell/ShfmtStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
162164
| [`sql.DBeaverSQLFormatterStep`](lib/src/main/java/com/diffplug/spotless/sql/DBeaverSQLFormatterStep.java) | :+1: | :+1: | :+1: | :white_large_square: |

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ VER_SLF4J=[1.6,2.0[
2828

2929
# Used in multiple places
3030
VER_DURIAN=1.2.0
31-
VER_JGIT=6.7.0.202309050840-r
32-
VER_JUNIT=5.10.2
33-
VER_ASSERTJ=3.26.0
34-
VER_MOCKITO=5.12.0
31+
VER_JGIT=6.10.0.202406032230-r
32+
VER_JUNIT=5.11.2
33+
VER_ASSERTJ=3.26.3
34+
VER_MOCKITO=5.14.2

gradle/changelog.gradle

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
String kind
2+
String releaseTitle
23
if (project.name == 'plugin-gradle') {
34
kind = 'gradle'
5+
releaseTitle = 'Gradle Plugin'
46
} else if (project.name == 'plugin-maven') {
57
kind = 'maven'
6-
} else if (project.name.startsWith('eclipse')) {
7-
kind = 'ext-' + project.name
8+
releaseTitle = 'Maven Plugin'
89
} else {
910
assert project == rootProject
1011
kind = 'lib'
12+
releaseTitle = 'Lib'
1113
}
1214

1315
// the root project and plugins have their own changelogs
@@ -20,11 +22,15 @@ spotlessChangelog {
2022
branch 'release'
2123
tagPrefix "${kind}/"
2224
commitMessage "Published ${kind}/{{version}}" // {{version}} will be replaced
23-
}
25+
tagMessage "{{changes}}"
26+
runAfterPush "gh release create ${kind}/{{version}} --title '${releaseTitle} v{{version}}' --notes-from-tag"
2427

25-
if (gradle.startParameter.projectProperties.get('com.diffplug.spotless.include.ext.nop2') == 'true') {
26-
tasks.named('changelogPrint') {
27-
enabled = kind.startsWith('ext-')
28+
if (kind == 'gradle') {
29+
forceNextVersion '7.0.0.BETA3'
30+
} else if (kind == 'maven') {
31+
forceNextVersion '2.44.0.BETA3'
32+
} else {
33+
forceNextVersion '3.0.0.BETA3'
2834
}
2935
}
3036

gradle/special-tests.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ tasks.withType(Test).configureEach {
1717
maxRetries = 2
1818
maxFailures = 10
1919
}
20-
21-
// There are only 2 cores in each GitHub Action Runner, we use all of them here.
22-
maxParallelForks = Runtime.getRuntime().availableProcessors()
23-
} else {
24-
// https://docs.gradle.org/8.4/userguide/performance.html#execute_tests_in_parallel
25-
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
2620
}
21+
22+
// https://docs.gradle.org/8.8/userguide/performance.html#execute_tests_in_parallel
23+
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
2724
}
2825
tasks.named('test').configure {
2926
useJUnitPlatform {

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)