IntelliJ insert blank line before last '}' in class files

This is not possible with stock IntelliJ. If you open up Preferences > Editor > Code Style > Java and then click the Blank Lines Tab. you can see a list of options.

As you can see, there is an option for Maximum Blank Lines Before '}' but unfortunately not for Minimum Blank Lines.

enter image description here

UPDATE:

"Before class end" option was added to "Minimum Blank Lines".

Available since 2018.2 - Youtrack Ticket

enter image description here


Settings > Editor > Code Style > Java -> Blank Lines Tab

Before class end: 1

Preview