← 输入框|github.com|刷新
Skip to content

Releases: diffplug/spotless

Maven Plugin v3.11.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 21:21

Added

  • Add <cleanup>false</cleanup> to <googleJavaFormat> to disable google-java-format's non-whitespace cleanups. (#3157)
  • Add a <maxLineLength> parameter to <googleJavaFormat>. (#3151)
    Overrides the 100-column limit prescribed by the GOOGLE and AOSP styles; requires google-java-format 2.0.0 or later.

Changes

  • Bump default google-java-format version 1.36.1 -> 2.0.0. (#3157)
    This version applies some small non-whitespace cleanups by default (removing redundant semicolons, empty annotation parentheses, and parentheses around single lambda parameters), which can be disabled with <cleanup>false</cleanup>.

Lib v4.11.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 20:58

Added

  • Add a cleanup option to GoogleJavaFormatStep to disable google-java-format's non-whitespace cleanups. (#3157)
  • Add a maxLineLength option to GoogleJavaFormatStep. (#3151)
    Overrides the 100-column limit prescribed by the GOOGLE and AOSP styles. Requires google-java-format 2.0.0 or later, the bug-fixing major release which stabilized the configurable JavaFormatterOptions.Style introduced experimentally in 1.37.0 (no 1.38.0 was ever published).

Changes

  • Bump default google-java-format version 1.36.1 -> 2.0.0. (#3157)

Gradle Plugin v8.11.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 21:08

Added

  • Add cleanup(false) to googleJavaFormat() to disable google-java-format's non-whitespace cleanups. (#3157)
  • Add maxLineLength(int) to googleJavaFormat(). (#3151)
    Overrides the 100-column limit prescribed by the GOOGLE and AOSP styles; requires google-java-format 2.0.0 or later.

Changes

  • Bump default google-java-format version 1.36.1 -> 2.0.0. (#3157)
    This version applies some small non-whitespace cleanups by default (removing redundant semicolons, empty annotation parentheses, and parentheses around single lambda parameters), which can be disabled with cleanup(false).

Maven Plugin v3.10.4

Choose a tag to compare

@github-actions github-actions released this 08 Oct 22:20

Changes

  • Bump default eclipse version from 4.40 to 4.41.
  • Bump default gherkin version 42.0.0 -> 42.0.1. (#3088)
  • Bump default jackson version 2.22.2 -> 2.22.3. (#3101)
  • Bump default palantir-java-format version 2.98.0 -> 2.102.0. (#3103, #3132)
  • Bump default mockito-core version 5.23.0 -> 5.24.0. (#3106)
  • Bump default greclipse version to latest 4.40 -> 4.41. (#3123)
  • Bump default ktfmt version 0.64 -> 0.65. (#3135)
    Which moved to the org.jetbrains.kotlinx:ktfmt coordinate and org.jetbrains.kotlinx.ktfmt package. Older versions are still supported.
  • Bump default palantir-java-format version 2.99.0 -> 2.102.0. (#3132)

Fixed

  • Migrate Plexus component injection to JSR-330 and Maven parameter. (#3122)
  • shortenFullyQualifiedTypes leaves a qualified name alone when the enclosing type extends or implements a type that is not in the same file, so an inherited member type cannot take the simple name. (#3117)
  • expandWildcardImports no longer drops the import of a type that is only used to qualify a static member (such as Collections.sort(list) or TimeUnit.SECONDS), or the static import of a field or enum constant (such as PI from import static java.lang.Math.*), which produced code that did not compile. (#2833)

Lib v4.10.4

Choose a tag to compare

@github-actions github-actions released this 08 Oct 22:03

Changes

  • Bump default Eclipse JDT formatter version from 4.40 to 4.41.
  • GitPrePushHookInstaller takes optional parameter for pre push hook directory, instead of always writing to .git/hooks. (#3115
  • Bump default gherkin version 42.0.0 -> 42.0.1. (#3088)
  • Bump default jackson version 2.22.2 -> 2.22.3. (#3101)
  • Bump default palantir-java-format version 2.98.0 -> 2.102.0. (#3103, #3132)
  • Bump default mockito-core version 5.23.0 -> 5.24.0. (#3106)
  • Bump default greclipse version to latest 4.40 -> 4.41. (#3123)
  • Bump default ktfmt version 0.64 -> 0.65. (#3135)
    Which moved to the org.jetbrains.kotlinx:ktfmt coordinate and org.jetbrains.kotlinx.ktfmt package. Older versions are still supported.
  • Bump default palantir-java-format version 2.99.0 -> 2.102.0. (#3132)

Fixed

  • shortenFullyQualifiedTypes no longer corrupts a method reference on a field/variable (localVar.field::method), which JavaParser parses as a type-shaped scope; such scopes now go through the same known-package / minimum-depth heuristic as other expression scopes before being treated as fully-qualified types. (#3133)
  • shortenFullyQualifiedTypes leaves a qualified name alone when the enclosing type extends or implements a type that is not in the same file, so an inherited member type cannot take the simple name. (#3117)
  • expandWildcardImports no longer drops the import of a type that is only used to qualify a static member (such as Collections.sort(list) or TimeUnit.SECONDS), or the static import of a field or enum constant (such as PI from import static java.lang.Math.*), which produced code that did not compile. (#2833)

Gradle Plugin v8.10.4

Choose a tag to compare

@github-actions github-actions released this 08 Oct 22:13

Changes

  • Bump default eclipse version from 4.40 to 4.41.
  • spotlessInstallGitPrePushHook now respects Git’s core.hooksPath when installing the pre-push hook, instead of always writing to .git/hooks. (#3115
  • Bump default gherkin version 42.0.0 -> 42.0.1. (#3088)
  • Bump default jackson version 2.22.2 -> 2.22.3. (#3101)
  • Bump default palantir-java-format version 2.98.0 -> 2.102.0. (#3103, #3132)
  • Bump default mockito-core version 5.23.0 -> 5.24.0. (#3106)
  • Bump default greclipse version to latest 4.40 -> 4.41. (#3123)
  • Bump default ktfmt version 0.64 -> 0.65. (#3135)
    Which moved to the org.jetbrains.kotlinx:ktfmt coordinate and org.jetbrains.kotlinx.ktfmt package. Older versions are still supported.
  • Bump default palantir-java-format version 2.99.0 -> 2.102.0. (#3132)

Fixed

  • shortenFullyQualifiedTypes leaves a qualified name alone when the enclosing type extends or implements a type that is not in the same file, so an inherited member type cannot take the simple name. (#3117)
  • expandWildcardImports no longer drops the import of a type that is only used to qualify a static member (such as Collections.sort(list) or TimeUnit.SECONDS), or the static import of a field or enum constant (such as PI from import static java.lang.Math.*), which produced code that did not compile. (#2833)

Maven Plugin v3.10.3

Choose a tag to compare

@github-actions github-actions released this 25 Sep 20:10

Changes

  • Generate formatter defaults from version catalog. (#3045)
  • Bump default gson version 2.13.2 -> 2.14.0. (#3045)
  • Bump default zjsonpatch version 0.4.14 -> 0.4.16. (#3045)
  • Bump default jackson-dataformat-yaml version 2.14.1 -> 2.20.1. (#3045)
  • Bump default ktfmt version 0.63 -> 0.64. (2988)
  • Bump default cleanthat version 2.25 -> 2.26. (#2882)
  • Bump default jackson version 2.20.1 -> 2.22.2. (#2819)
  • Bump default javaparser version 3.27.1 -> 3.28.2. (#3065)
  • Bump default palantir-java-format version 2.80.0 -> 2.98.0. (#3068)
  • Bump default scalafmt version 3.8.1 -> 3.11.5. (#2173)
  • Bump default google-java-format version 1.30.0 -> 1.36.1. (#3075)
  • Bump default gherkin-utils version 10.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)
  • typescript prettier() no longer emits a warning when its parser is already set to typescript. (#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 NoClassDefFoundError or NoSuchMethodError when lombok is active as a JVM agent (e.g. -javaagent:lombok.jar in Eclipse/VS Code/Cursor). (#2795)

Gradle Plugin v8.10.3

Choose a tag to compare

@github-actions github-actions released this 25 Sep 20:13

Changes

  • Generate formatter defaults from version catalog. (#3045)
  • Bump default gson version 2.13.2 -> 2.14.0. (#3045)
  • Bump default zjsonpatch version 0.4.14 -> 0.4.16. (#3045)
  • Bump default jackson-dataformat-yaml version 2.14.1 -> 2.20.1. (#3045)
  • Bump default ktfmt version 0.63 -> 0.64. (2988)
  • Bump default cleanthat version 2.25 -> 2.26. (#2882)
  • Bump default jackson version 2.20.1 -> 2.22.2. (#2819)
  • Bump default javaparser version 3.27.1 -> 3.28.2. (#3065)
  • Bump default palantir-java-format version 2.80.0 -> 2.98.0. (#3068)
  • Bump default scalafmt version 3.8.1 -> 3.11.5. (#2173)
  • Bump default google-java-format version 1.30.0 -> 1.36.1. (#3075)
  • Bump default gherkin-utils version 10.0.0 -> 12.0.2. (#2979)
  • We no longer publish a plugin marker for the legacy com.diffplug.gradle.spotless id, which has been redirecting to com.diffplug.spotless since 4.0. Builds that still request it now fail with Plugin [id: 'com.diffplug.gradle.spotless'] was not found instead 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)
  • typescript prettier() no longer emits a warning when its parser is already set to typescript. (#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.setVisible from Gradle 9.0.0 (#3053)
  • Eclipse JDT formatter step no longer fails with NoClassDefFoundError or NoSuchMethodError when lombok is active as a JVM agent (e.g. -javaagent:lombok.jar in Eclipse/VS Code/Cursor). (#2795)

Maven Plugin v3.10.2

Choose a tag to compare

@github-actions github-actions released this 04 Sep 18:59

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 NoClassDefFoundError when lombok is active as a JVM agent (e.g. -javaagent:lombok.jar in Eclipse/VS Code/Cursor). (#2795)

Lib v4.10.2

Choose a tag to compare

@github-actions github-actions released this 04 Sep 18:57

Fixed

  • ShortenFullyQualifiedTypesStep 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)
  • FeatureClassLoader now provides stub implementations of lombok.* classes (and synthesises empty classes for any others) so that the Eclipse JDT formatter step no longer fails with NoClassDefFoundError when lombok is active as a JVM agent (e.g. -javaagent:lombok.jar in Eclipse/VS Code/Cursor). (#2795)