<p>I use the commercial version of Jalopy for my Java projects but it doesn't work on Groovy files.  IntelliJ has a serviceable formatter but I don't like requiring a particular IDE.</p>

Try "BUSL"
2022-10-26 NOTE:
HISTORIC. "BUSL" seems to be dead.
Last archived webpage is from 2020
.
I've found that
BUSL
works really well on Groovy files. It's standalone too, so you can use it from your text editor or whatever.