You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Google-Java-Formats own import order out of the box #1769
As mentioned in #1680 spotless v6.18.0 unintentionally switched to gjf's own import order handling which was introduced as default also into the corresponding intellij plugin.
With spotless v6.19.0 the import order was changed back to the previous behavior of spotless prior v6.18.
I would like to see a simple config API change to the googleJavaFormat() definition which disables spotless own import order and uses the order from gjf.
I tried this out with the recently release version 6.21 of the gradle plugin.
It looks like the new setting reorderImports(true) doesn't have any effect on our setup. While others like aosp() or using an older version is working.
I get the following change in the import order when updating from 6.18.0 (which accidentally enabled gjfs own import order) to 6.21.0:
Activity
nedtwigg commentedon Jul 28, 2023
Implementing this is super duper easy, just do the inverse of this: 0183cc2
The only tricky part is the API, maybe:
googleJavaFormat().reorderImports(true), and leavefalseas the default value.Happy to merge a PR for this.
Support GJF own import order (#1780 implements #1769)
nedtwigg commentedon Sep 1, 2023
Released in
plugin-gradle 6.21.0andplugin-maven 2.38.0.bjrke commentedon Oct 17, 2023
I tried this out with the recently release version 6.21 of the gradle plugin.
It looks like the new setting
reorderImports(true)doesn't have any effect on our setup. While others likeaosp()or using an older version is working.I get the following change in the import order when updating from 6.18.0 (which accidentally enabled gjfs own import order) to 6.21.0: