In the Code Style settings of IntelliJ IDEA, there aren't any subcategories for .gradle
files (e.g., build.gradle
), and under Other File Types, there isn't any option to modify brace placements. I did not find solutions on to set brace placement for .gradle
files.
What I'm trying to do: Make the braces look like this by default and after reformatting:
repositories
{
mavenCentral()
}
Instead of this:
repositories {
mavenCentral()
}
Is this change possible using the current version of IntelliJ IDEA? (2020.1.1)
Changing the code style settings for Groovy does not have an effect for some reason.
Braces for a Groovy class is placed correctly as in the settings. (This is tested in a .gradle
file.)
It looks like the Settings (Preferences on macOS) → Editor → Code Style → Groovy → Wrapping and Braces → Braces placement → *Other option does not work as expected.
Please vote for the issue IDEA-241366.