Repository navigation
Releases: diffplug/spotless
Releases Β· diffplug/spotless
Release list
Maven Plugin v3.10.3
Changes
- Generate formatter defaults from version catalog. (#3045)
- Bump default
gsonversion2.13.2->2.14.0. (#3045) - Bump default
zjsonpatchversion0.4.14->0.4.16. (#3045) - Bump default
jackson-dataformat-yamlversion2.14.1->2.20.1. (#3045) - Bump default
ktfmtversion0.63->0.64. (2988) - Bump default
cleanthatversion2.25->2.26. (#2882) - Bump default
jacksonversion2.20.1->2.22.2. (#2819) - Bump default
javaparserversion3.27.1->3.28.2. (#3065) - Bump default
palantir-java-formatversion2.80.0->2.98.0. (#3068) - Bump default
scalafmtversion3.8.1->3.11.5. (#2173) - Bump default
google-java-formatversion1.30.0->1.36.1. (#3075) - Bump default
gherkin-utilsversion10.0.0->12.0.2. (#2979)
Fixed
- Fix release signing by using Gradle's required eight-digit signing subkey ID. (#3105)
- Fix race when creating the npm install cache directory. ((#3096)
- GrEclipse no longer emits expected OSGi and nested-jar warnings during initialization. (#2445)
typescriptprettier()no longer emits a warning when its parser is already set totypescript. (#3098)<versionCatalog>preserves standalone comments at section boundaries and the end of the file. (#3048)<versionCatalog>preserves entries when comments contain unmatched brackets, preserves commas inside quoted strings, and keeps significant line boundaries in multiline entries. (#3042)<versionCatalog>now reports unfinished entries as lints at their starting line. These fail formatting by default, so upgrading may expose catalog errors that previously caused silent data loss. (#3042)- Eclipse JDT formatter step no longer fails with
NoClassDefFoundErrororNoSuchMethodErrorwhen lombok is active as a JVM agent (e.g.-javaagent:lombok.jarin Eclipse/VS Code/Cursor). (#2795)
Gradle Plugin v8.10.3
Changes
- Generate formatter defaults from version catalog. (#3045)
- Bump default
gsonversion2.13.2->2.14.0. (#3045) - Bump default
zjsonpatchversion0.4.14->0.4.16. (#3045) - Bump default
jackson-dataformat-yamlversion2.14.1->2.20.1. (#3045) - Bump default
ktfmtversion0.63->0.64. (2988) - Bump default
cleanthatversion2.25->2.26. (#2882) - Bump default
jacksonversion2.20.1->2.22.2. (#2819) - Bump default
javaparserversion3.27.1->3.28.2. (#3065) - Bump default
palantir-java-formatversion2.80.0->2.98.0. (#3068) - Bump default
scalafmtversion3.8.1->3.11.5. (#2173) - Bump default
google-java-formatversion1.30.0->1.36.1. (#3075) - Bump default
gherkin-utilsversion10.0.0->12.0.2. (#2979) - We no longer publish a plugin marker for the legacy
com.diffplug.gradle.spotlessid, which has been redirecting tocom.diffplug.spotlesssince 4.0. Builds that still request it now fail withPlugin [id: 'com.diffplug.gradle.spotless'] was not foundinstead of the migration message. (#3086)
Fixed
- Fix release signing by using Gradle's required eight-digit signing subkey ID. (#3105)
- Fix race when creating the npm install cache directory. ((#3096)
- GrEclipse no longer emits expected OSGi and nested-jar warnings during initialization. (#2445)
typescriptprettier()no longer emits a warning when its parser is already set totypescript. (#3098)versionCatalog()preserves standalone comments at section boundaries and the end of the file. (#3048)versionCatalog()preserves entries when comments contain unmatched brackets, preserves commas inside quoted strings, and keeps significant line boundaries in multiline entries. (#3042)versionCatalog()now reports unfinished entries as lints at their starting line. These fail formatting by default, so upgrading may expose catalog errors that previously caused silent data loss. (#3042)- Stop calling deprecated
Configuration.setVisiblefrom Gradle 9.0.0 (#3053) - Eclipse JDT formatter step no longer fails with
NoClassDefFoundErrororNoSuchMethodErrorwhen lombok is active as a JVM agent (e.g.-javaagent:lombok.jarin Eclipse/VS Code/Cursor). (#2795)
Maven Plugin v3.10.2
Fixed
<shortenFullyQualifiedTypes>now shortens fully-qualified types used in expression contexts (such as static method calls, static fields, and enum constants) while avoiding imports that would change how existing unqualified type references resolve. (#3039)- Eclipse JDT formatter step no longer fails with
NoClassDefFoundErrorwhen lombok is active as a JVM agent (e.g.-javaagent:lombok.jarin Eclipse/VS Code/Cursor). (#2795)
Lib v4.10.2
Fixed
ShortenFullyQualifiedTypesStepnow shortens fully-qualified types used in expression contexts (such as static method calls, static fields, and enum constants) while avoiding imports that would change how existing unqualified type references resolve. (#3039)FeatureClassLoadernow provides stub implementations oflombok.*classes (and synthesises empty classes for any others) so that the Eclipse JDT formatter step no longer fails withNoClassDefFoundErrorwhen lombok is active as a JVM agent (e.g.-javaagent:lombok.jarin Eclipse/VS Code/Cursor). (#2795)
Gradle Plugin v8.10.2
Fixed
shortenFullyQualifiedTypes()now shortens fully-qualified types used in expression contexts (such as static method calls, static fields, and enum constants) while avoiding imports that would change how existing unqualified type references resolve. (#3039)- Eclipse JDT formatter step no longer fails with
NoClassDefFoundErrorwhen lombok is active as a JVM agent (e.g.-javaagent:lombok.jarin Eclipse/VS Code/Cursor). (#2795)
Maven Plugin v3.10.1
Fixed
<prettier>and other npm-based steps no longer fail to start on npm 12 (EUNKNOWNCONFIGfrom--scripts-prepend-node-path). (#3024)
Lib v4.10.1
Fixed
- Prettier and other npm-based formatters no longer fail to start on npm 12 (
EUNKNOWNCONFIGfrom--scripts-prepend-node-path). (#3024)
Gradle Plugin v8.10.1
Fixed
prettier()and other npm-based steps no longer fail to start on npm 12 (EUNKNOWNCONFIGfrom--scripts-prepend-node-path). (#3024)spotlessInternalRegisterDependenciesnow writes its output under a build directory that is configured after the plugin is applied, instead of always under the defaultbuild/. (#2114)targetExcludenow accepts a GradleDirectory,DirectoryProperty, orProvider<Directory>and excludes the files under it. Previously the directory was treated as a single file, so excluding one silently did nothing. (#2667)
Maven Plugin v3.10.0
Added
- New
<shortenFullyQualifiedTypes>step for Java, which replaces fully-qualified type names with their simple names and adds the imports they need. Best combined with<importOrder>and<removeUnusedImports>. (#2945) - Add embedded lockfiles to Eclipse JDT for every supported version (
4.9through4.40), soeclipse()resolves from Maven Central instead of querying a P2 update site. Versions without an embedded lockfile still fall back to P2 provisioning. (#1996) - Add support to apply alternate license header within same format (#872)
- Add support to skip license header application based on source file content pattern (#650).
Fixed
removeUnusedImportsno longer fails on Javaimport moduledeclarations. (#2890)- Concurrent P2 provisioning no longer races Solstice's on-disk cache (affects Eclipse-based formatters under parallel builds). (#3004)
Changes
- Default
google-java-formatremains1.28.0on JVM 17; bumps to1.30.0on JVM 21+; require at least1.30.0on JVM 25+ forimport modulesupport. - Bump default
eclipseversion to latest4.39->4.40. (#1996) - Document Maven skip properties
spotless.skip,spotless.check.skip, andspotless.apply.skip. Goal-specific skips now live on their own mojos so they no longer leak across goals. (#3009) - Bump default
adocfmtversion0.2.0->0.3.1, which adds table formatting support (<formatTables>,<tableLayout>,<tableMaxLineWidth>,<tableBlankLines>).
Lib v4.10.0
Added
- New
ShortenFullyQualifiedTypesStepfor Java, which replaces fully-qualified type names with their simple names and adds the imports they need. Uses JavaParser to find type references in the AST, so occurrences in strings, comments, and other non-type contexts are left alone. (#2945) - Add embedded lockfiles to Eclipse JDT for every supported version (
4.9through4.40), soeclipse()resolves from Maven Central instead of querying a P2 update site. Versions without an embedded lockfile still fall back to P2 provisioning. (#1996)
Fixed
removeUnusedImportsno longer throws on Javaimport moduledeclarations (JCModuleImportClassCastException). (#2890)- Concurrent P2 provisioning (parallel multi-project Gradle fingerprinting of
eclipse()/greclipse()steps) no longer races Solstice's on-disk cache; alsoConfigurationCacheHackList.toString()no longer evaluates step state (which could re-trigger provisioning while Gradle reports "cannot be serialized"). (#3004)
Changes
- Default
google-java-formatremains1.28.0on JVM 17; bumps to1.30.0on JVM 21+; require at least1.30.0on JVM 25+ forimport modulesupport. - Bump default
eclipseversion to latest4.39->4.40. (#1996) - Bump default
adocfmtversion0.2.0->0.3.1, which adds table formatting support (formatTables,tableLayout,tableMaxLineWidth,tableBlankLines).