Repository navigation
Gradle Plugin v8.12.0
·
6 commits
to main
since this release
Added
- Add
dependencyOverrides(Map)toprettier(),eslint()andtsfmt()to pin transitive npm dependencies via npmoverrides. (#2534) - Add
groupArtifact(String)topalantirJavaFormat(). (#3179) SpotlessApplywrites a report of the files it rewrote tobuild/spotless/<taskName>-changed-files.txt, configurable viachangedFilesReport. The report is a task output, so tasks which take it as an input automatically depend on the apply task. (#2715)- Add
replaceStaticImports()for Java, which replaces static imports with regular imports and qualified references, such asAssertions.assertTrue(x), using the compile classpath to resolve names. Pass the static imports to keep, such as'org.assertj.core.api.Assertions.*'. (#1379)
Changes
- Bump default
adocfmtversion0.3.1->0.3.2. (#3180) - Bump default
jacksonversion2.22.3->2.22.4. (#3146) - Bump default
palantir-java-formatversion2.102.0->2.103.0. (#3172) - Bump default
prince-of-spaceversion2.2.0->2.3.1. (#3181) - Bump default
tabletest-formatterversion1.1.2->1.1.3. (#3167) - Bump default
gsonversion2.14.0->2.15.0. (#3168) SpotlessApplynow only reports that it did work (and is otherwiseUP-TO-DATE) when it actually rewrote a file. (#2715)- Bump default
jacksonversion2.22.4->2.23.0. (#3193)
Fixed
shortenFullyQualifiedTypes()now also shortens fully qualified annotation names such as@com.example.Foo. (#3159)- The README section "Can I apply Spotless to specific files?" no longer documents
-PspotlessFiles, which the Gradle plugin does not read; it points to-PspotlessIdeHookandratchetFrominstead. (#3183) - GrEclipse no longer leaves a
file%3A...directory in the working directory. (#2019) - DBeaver SQL formatter no longer prints an
IndexOutOfBoundsExceptionwhen a file starts with a keyword likeSET. (#1552) - DBeaver SQL formatter no longer adds spaces inside backtick-quoted identifiers such as
`MyCol.1`. (#2250) expandWildcardImports()no longer fails withSymbol resolution not configuredon records and other syntax newer than Java 11, and leaves files JavaParser cannot validate unchanged. (#2946)- String
targetExcludepatterns ending in/**(e.g.**/build/**) are now applied as exclude patterns on Stringtargets, so excluded directories are skipped while walking the target instead of walking the whole project directory, which made configuration cache store and reuse scale with the size of the project. (#3147) removeSemicolons()no longer removes semicolons inside dollar-slashy strings ($/ ... /$), after escaped triple quotes in multiline strings, or in multi-linefor (init; cond; update)headers. (#2780)removeUnusedImports()andgoogleJavaFormat()no longer remove imports that are only used by links in Markdown doc comments (///, JDK 23+). (#3161)forbidWildcardImportsno longer reports import statements inside Java text blocks or comments. (#2997)spotlessCheckno longer fails withThere were 0 lint error(s)whenspotless-cleanonly contains stale files which already match the source on disk. (#2992)