Skip to content

Commit 4a6620a

Browse files
committed
Fix reorderImports not working
1 parent 5ae6a5d commit 4a6620a

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1212
## [Unreleased]
1313
### Changes
1414
* Bump default `ktlint` version to latest `1.0.0` -> `1.0.1`. ([#1855](https://github.com/diffplug/spotless/pull/1855))
15+
### Fixed
16+
* Fix `GoogleJavaFormatConfig.reorderImports` not working. ([#1872](https://github.com/diffplug/spotless/issues/1872))
1517

1618
## [2.42.0] - 2023-09-28
1719
### Added

plugin-gradle/CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
55
## [Unreleased]
66
### Changes
77
* Bump default `ktlint` version to latest `1.0.0` -> `1.0.1`. ([#1855](https://github.com/diffplug/spotless/pull/1855))
8+
### Fixed
9+
* Fix `GoogleJavaFormatConfig.reorderImports` not working. ([#1872](https://github.com/diffplug/spotless/issues/1872))
810

911
## [6.22.0] - 2023-09-28
1012
### Added

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public GoogleJavaFormatConfig reflowLongStrings(boolean reflowLongStrings) {
211211

212212
public GoogleJavaFormatConfig reorderImports(boolean reorderImports) {
213213
this.reorderImports = reorderImports;
214+
replaceStep(createStep());
214215
return this;
215216
}
216217

plugin-maven/CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
77
* CompileSourceRoots and TestCompileSourceRoots are now respected as default includes. These properties are commonly set when adding extra source directories. ([#1846](https://github.com/diffplug/spotless/issues/1846))
88
### Fixed
99
* Fix crash when build dir is a softlink to another directory. ([#1859](https://github.com/diffplug/spotless/pull/1859))
10+
* Fix `GoogleJavaFormatConfig.reorderImports` not working. ([#1872](https://github.com/diffplug/spotless/issues/1872))
1011
### Changes
1112
* Bump default `ktlint` version to latest `1.0.0` -> `1.0.1`. ([#1855](https://github.com/diffplug/spotless/pull/1855))
1213

0 commit comments

Comments
 (0)