Have you ever been told that the format is not in place in java? it's simple. Just add the following to your build.gradle:
build.gradle
plugins {
id 'com.github.sherter.google-java-format' version '0.7.1'
}
Check if the plugin has been added. I think googleJavaFormat has been added to Other tasks.
$ gradle tasks --all
Other tasks
-----------
googleJavaFormat
All you have to do is run it.
$ gradle tasks googleJavaFormat
Yes, it's beautiful. I can't get angry anymore.
Recommended Posts