镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

reorderImports for GJF is ignored if used as last config #1871

Closed

Description

@bjrke

I reported #1769 which I happily noticed got fixed with #1780.
But it looks like there is a mistake.

while (gradle kotlin syntax)
spotless { java { googleJavaFormat().reorderImports(true).aosp() } }
is using GJFs import order
spotless { java { googleJavaFormat().aosp().reorderImports(true) } }
is using spotless import order.

I assume the reason for it is a missing replaceStep(createStep()); call in reorderImports which is executed with the aosp() call in the working version. I will link the position in the PR with this ticket.

If you are submitting a bug, please include the following:

  • summary of problem
    see above
  • gradle or maven version
    gradle 8.3 but others are affected as well
  • spotless version
    gradle spotless 6.22
  • operating system and version
    linux, but irrelevant
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
    see description
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
    no error output

If you're just submitting a feature request or question, no need for the above.

Activity

  1. added a commit that references this issue on Nov 2, 2023
    ffea281
  2. nedtwigg commented on Nov 27, 2023

    @nedtwigg
    Member

    Released in plugin-gradle 6.23.0 and plugin-maven 2.41.0 thanks to @Goooler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions