Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
6 tasks done
bjrke opened this issue Nov 2, 2023 · 1 comment · Fixed by #1872
Closed
6 tasks done

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

bjrke opened this issue Nov 2, 2023 · 1 comment · Fixed by #1872

Comments

@bjrke
Copy link

bjrke commented Nov 2, 2023

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.

@nedtwigg
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants