Skip to content

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

@bjrke

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.

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