File tree Expand file tree Collapse file tree 5 files changed +53
-23
lines changed Expand file tree Collapse file tree 5 files changed +53
-23
lines changed Original file line number Diff line number Diff line change 33
33
run : ./gradlew spotlessCheck
34
34
- name : assemble testClasses
35
35
run : ./gradlew assemble testClasses
36
+ rewriteDryRun :
37
+ name : rewriteDryRun
38
+ runs-on : ubuntu-latest
39
+ env :
40
+ buildcacheuser : ${{ secrets.BUILDCACHE_USER }}
41
+ buildcachepass : ${{ secrets.BUILDCACHE_PASS }}
42
+ steps :
43
+ - name : Checkout
44
+ uses : actions/checkout@v4
45
+ with :
46
+ fetch-depth : 0
47
+ - uses : actions/setup-java@v4
48
+ with :
49
+ distribution : " temurin"
50
+ java-version : 21
51
+ - name : gradle caching
52
+ uses : gradle/actions/setup-gradle@v4
53
+ - name : rewriteDryRun
54
+ run : ./gradlew rewriteDryRun --build-cache --info
36
55
build :
37
56
needs : sanityCheck
38
57
strategy :
@@ -66,10 +85,10 @@ jobs:
66
85
uses : gradle/actions/setup-gradle@v4
67
86
- name : build (maven-only)
68
87
if : matrix.kind == 'maven'
69
- run : ./gradlew :plugin-maven:build -x spotlessCheck
88
+ run : ./gradlew :plugin-maven:build -x spotlessCheck -x rewriteDryRun
70
89
- name : build (everything-but-maven)
71
90
if : matrix.kind == 'gradle'
72
- run : ./gradlew build -x spotlessCheck -PSPOTLESS_EXCLUDE_MAVEN=true
91
+ run : ./gradlew build -x spotlessCheck -x rewriteDryRun - PSPOTLESS_EXCLUDE_MAVEN=true
73
92
- name : test npm
74
93
if : matrix.kind == 'npm'
75
94
run : ./gradlew testNpm
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
16
16
* Adds support for worktrees (fixes [ #1765 ] ( https://github.com/diffplug/spotless/issues/1765 ) )
17
17
* Bump default ` google-java-format ` version to latest ` 1.24.0 ` -> ` 1.28.0 ` . ([ #2345 ] ( https://github.com/diffplug/spotless/pull/2345 ) )
18
18
* Bump default ` ktlint ` version to latest ` 1.5.0 ` -> ` 1.7.1 ` . ([ #2555 ] ( https://github.com/diffplug/spotless/pull/2555 ) )
19
+ * Add ` rewrite ` support ([ #2588 ] ( https://github.com/diffplug/spotless/pull/2588 ) )
19
20
20
21
## [ 3.3.1] - 2025-07-21
21
22
### Fixed
Original file line number Diff line number Diff line change 1
1
apply plugin : ' dev.equo.ide'
2
- equoIde {
3
- branding(). title(' Spotless' ). icon(file(' _images/spotless_logo.png' ))
4
- welcome(). openUrl(' https://github.com/diffplug/spotless/blob/main/CONTRIBUTING.md' )
5
- gradleBuildship(). autoImport(' .' )
6
- }
7
2
8
- repositories {
9
- mavenCentral()
10
- }
11
-
12
- apply from : rootProject. file(' gradle/java-publish.gradle' )
13
3
apply from : rootProject. file(' gradle/changelog.gradle' )
4
+ apply from : rootProject. file(' gradle/java-publish.gradle' )
5
+ apply from : rootProject. file(' gradle/spotless-freshmark.gradle' )
6
+
14
7
allprojects {
15
8
apply from : rootProject. file(' gradle/spotless.gradle' )
9
+ apply from : rootProject. file(' gradle/rewrite.gradle' )
10
+ }
11
+
12
+ equoIde {
13
+ branding(). title(' Spotless' ). icon(file(' _images/spotless_logo.png' ))
14
+ welcome(). openUrl(' https://github.com/diffplug/spotless/blob/main/CONTRIBUTING.md' )
15
+ gradleBuildship(). autoImport(' .' )
16
16
}
17
- apply from : rootProject. file(' gradle/spotless-freshmark.gradle' )
18
17
19
- spotless {
20
- groovyGradle {
21
- target ' *.gradle' , ' gradle/*.gradle'
22
- }
23
- format ' dotfiles' , {
24
- target ' .gitignore' , ' .gitattributes' , ' .editorconfig'
25
- leadingTabsToSpaces(2 )
26
- trimTrailingWhitespace()
27
- endWithNewline()
28
- }
18
+ dependencies {
19
+ rewrite(platform(" org.openrewrite.recipe:rewrite-recipe-bom:latest.release" ))
29
20
}
Original file line number Diff line number Diff line change
1
+ apply plugin : ' org.openrewrite.rewrite'
2
+
3
+ rewrite {
4
+ // activeRecipe("org.openrewrite.java.RemoveUnusedImports")
5
+ // bugs
6
+ exclusions. add(" **AJacksonFormatterFunc.java" )
7
+ exclusions. add(" **NpmPathResolver.java" )
8
+ exclusions. add(" **NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_*.gradle" )
9
+ exclusions. add(" **gradle/changelog.gradle" )
10
+ exclusions. add(" **gradle/java-publish.gradle" )
11
+ exclusions. add(" **lib-extra/build.gradle" )
12
+ exclusions. add(" **lib/build.gradle" )
13
+ exclusions. add(" **package-info.java" )
14
+ exclusions. add(" **plugin-maven/build.gradle" )
15
+ exclusions. add(" **settings.gradle" )
16
+ exportDatatables = true
17
+ failOnDryRunResults = true
18
+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ plugins {
23
23
id ' com.gradle.develocity' version ' 3.19.2'
24
24
// https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
25
25
id ' dev.equo.ide' version ' 1.7.8' apply false
26
+ id ' org.openrewrite.rewrite' version ' 7.12.1' apply false
26
27
}
27
28
28
29
dependencyResolutionManagement {
You can’t perform that action at this time.
0 commit comments