I use the Spotless Gradle plugin to ensure consistent formatting of the Java code in my app. The relevant entries in build.gradle
are
plugins {
id "com.diffplug.gradle.spotless" version "3.27.0"
}
spotless {
java {
// The available versions of the Eclipse JDT formatter are defined here
// https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter
eclipse('4.13.0')
indentWithSpaces()
removeUnusedImports()
}
}
Is there some way I can configure IntelliJ to use the same formatting settings?