Releases: diffplug/spotless
Releases · diffplug/spotless
Gradle Plugin v7.0.0
Headline changes
- The long
7.0.0.BETAXperiod is finally over, Spotless for Gradle 7.0 is here! - Full, no asterisk support for configuration cache (end of #987)
- Spotless now supports linting in addition to formatting.
Changed
- Allow setting Eclipse config from a string, not only from files (#2337)
- Bump default
ktlintversion to latest1.3.0->1.4.0. (#2314) - Bump default
jacksonversion to latest2.18.0->2.18.1. (#2319) - Bump default
ktfmtversion to latest0.52->0.53. (#2320) - Bump default
ktlintversion to latest1.4.0->1.5.0. (#2354) - Bump minimum
eclipse-cdtversion to11.0(removed support for10.7). (#2373) - Bump default
eclipseversion to latest4.32->4.34. (#2381)
Fixed
toggleOffOnnow works with the configuration cache. (#2378 fixes #2317)- Using
customwith a Groovy closure now works with and without configuration cache. (#2376)- Minimum required Gradle version for this to work has bumped from
8.0to8.4. - The global git system config is now ignored for line-ending purposes.
- Added
SerializeToByteArrayHackas a flag for a limitation at the intersection oftoggleOffOnandcustom.
- Minimum required Gradle version for this to work has bumped from
- You can now use
removeUnusedImportsandgoogleJavaFormatat the same time again. (fixes #2159) - The default list of type annotations used by
formatAnnotationsnow includes Jakarta Validation'sValidand constraints validations (fixes #2334) indentWith[Spaces|Tabs]has been deprecated in favor ofleadingTabsToSpacesandleadingSpacesToTabs. (#2350 fixes #794)
Maven Plugin v2.44.0.BETA4
Lib v3.0.0.BETA4
Added
- APIs to support linting. (implemented in #2148, #2149, #2307)
- Spotless is still primarily a formatter, not a linter. But when formatting fails, it's more flexible to model those failures as lints so that the formatting can continue and ideally we can also capture the line numbers causing the failure.
Lintmodels a single change. AFormatterStepcan create a lint by:- throwing an exception during formatting, ideally
throw Lint.atLine(127, "code", "Well what happened was...") - or by implementing the
List<Lint> lint(String content, File file)method to create multiple of them
- throwing an exception during formatting, ideally
- Support for line ending policy
PRESERVEwhich just takes the first line ending of every given file as setting (no matter if\n,\r\nor\r) (#2304)
Changes
- BREAKING Moved
PaddedCell.DirtyStateto its own top-level class with new methods. (#2148)- BREAKING Removed
isClean,applyTo, andapplyToAndReturnResultIfDirtyfromFormatterbecause users should instead useDirtyState.
- BREAKING Removed
Fixed
ktlintsteps now read from thestringinstead of thefileso they don't clobber earlier steps. (fixes #1599)
Gradle Plugin v7.0.0.BETA4
Added
- Support for line ending policy
PRESERVEwhich just takes the first line ending of every given file as setting (no matter if\n,\r\nor\r) (#2304) - New
suppressLintsForDSL (docs) (#2307)ignoreErrorForStepandignoreErrorForPathare now deprecated aliases ofsuppressLintsFor- Spotless is still a formatter not a linter, it just models formatting failures as lints rather than stopping execution (resolves #287)
Fixed
ktlintsteps now read from thestringinstead of thefileso they don't clobber earlier steps. (fixes #1599)
Maven Plugin v2.44.0.BETA3
Added
Changed
- Leverage local repository for Equo P2 cache. (#2238)
- Add explicit support for CSS via biome. Formatting CSS via biome was already supported as a general
formatting step. Biome supports formatting CSS as of 1.8.0 (experimental, opt-in) and 1.9.0 (stable).
(#2259) - Bump default
google-java-formatversion to latest1.23.0->1.24.0. (#2294) - Bump default
jacksonversion to latest2.17.2->2.18.0. (#2279) - Bump default
cleanthatversion to latest2.21->2.22. (#2296)
Fixed
- Java import order, ignore duplicate group entries. (#2293)
Lib v3.0.0.BETA3
Added
- Support for
rdf(#2261) - Support for
bufon maven plugin (#2291) ConfigurationCacheHackso we can support Gradle's configuration cache and remote build cache at the same time. (TODOfixes #2168)
Changed
- Support configuring the Equo P2 cache. (#2238)
- Add explicit support for JSONC / CSS via biome, via the file extensions
.cssand.jsonc.
(#2259) - Bump default
bufversion to latest1.24.0->1.44.0. (#2291) - Bump default
google-java-formatversion to latest1.23.0->1.24.0. (#2294) - Bump default
jacksonversion to latest2.17.2->2.18.0. (#2279) - Bump default
cleanthatversion to latest2.21->2.22. (#2296)
Fixed
- Java import order, ignore duplicate group entries. (#2293)
Gradle Plugin v7.0.0.BETA3
Added
Changed
- Use the Gradle user home directory by default for the download directory for the biome executable. Previously, the
plugin tried to use Maven's home directory, which is not always accessible by a Gradle plugin. (#2187) - Add explicit support for CSS via biome. Formatting CSS via biome was already supported as a general
formatting step. Biome supports formatting CSS as of 1.8.0 (experimental, opt-in) and 1.9.0 (stable).
(#2259)
Changed
- Bump default
bufversion to latest1.24.0->1.44.0. (#2291) - Bump default
google-java-formatversion to latest1.23.0->1.24.0. (#2294) - Bump default
jacksonversion to latest2.17.2->2.18.0. (#2279) - Bump default
cleanthatversion to latest2.21->2.22. (#2296)
Fixed
Maven Plugin v2.44.0.BETA2
Changed
- Support toning down sortPom logging. (#2185)
- Bump default
ktlintversion to latest1.2.1->1.3.0. (#2165) - Bump default
ktfmtversion to latest0.49->0.52. (#2172, #2231) - Rename property
ktfmtoptionremoveUnusedImport->removeUnusedImportsto matchktfmt. (#2172) - Bump default
eclipseversion to latest4.29->4.32. (#2179) - Bump default
greclipseversion to latest4.29->4.32. (#2179, #2190) - Bump default
cdtversion to latest11.3->11.6. (#2179) - Bump default
gsonversion to latest2.10.1->2.11.0. (#2128) - Bump default
jacksonversion to latest2.17.1->2.17.2. (#2195) - Bump default
cleanthatversion to latest2.20->2.21. (#2210) - Bump default
google-java-formatversion to latest1.22.0->1.23.0. (#2212)
Fixed
- Fix compatibility issue introduced by
ktfmt0.51. (#2172)
Added
- Add option
manageTrailingCommastoktfmt. (#2177)
Lib v3.0.0.BETA2
Changed
- Support toning down sortPom logging. (#2185)
- Bump default
ktlintversion to latest1.2.1->1.3.0. (#2165) - Bump default
ktfmtversion to latest0.49->0.52. (#2172, #2231) - Rename property
ktfmtoptionremoveUnusedImport->removeUnusedImportsto matchktfmt. (#2172) - Bump default
eclipseversion to latest4.29->4.32. (#2179) - Bump default
greclipseversion to latest4.29->4.32. (#2179, #2190) - Bump default
cdtversion to latest11.3->11.6. (#2179) - Bump default
gsonversion to latest2.10.1->2.11.0. (#2128) - Bump default
jacksonversion to latest2.17.1->2.17.2. (#2195) - Bump default
cleanthatversion to latest2.20->2.21. (#2210) - Bump default
google-java-formatversion to latest1.22.0->1.23.0. (#2212)
Fixed
- Fix compatibility issue introduced by
ktfmt0.51. (#2172)
Added
- Add option
manageTrailingCommastoktfmt. (#2177)
Gradle Plugin v7.0.0.BETA2
Changed
- Support toning down sortPom logging. (#2185)
- Bump default
ktlintversion to latest1.2.1->1.3.0. (#2165) - Bump default
ktfmtversion to latest0.49->0.52. (#2172, #2231) - Rename property
ktfmtoptionremoveUnusedImport->removeUnusedImportsto matchktfmt. (#2172) - Bump default
eclipseversion to latest4.29->4.32. (#2179) - Bump default
greclipseversion to latest4.29->4.32. (#2179, #2190) - Bump default
cdtversion to latest11.3->11.6. (#2179) - Bump default
gsonversion to latest2.10.1->2.11.0. (#2128) - Bump default
cleanthatversion to latest2.20->2.21. (#2210) - Bump default
google-java-formatversion to latest1.22.0->1.23.0. (#2212)
Fixed
- Fix compatibility issue introduced by
ktfmt0.51. (#2172)
Added
- Add option
manageTrailingCommastoktfmt. (#2177)