diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 222ca47873..37247f9e8d 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -140,7 +140,7 @@ spotless { Configuration for Groovy is similar to [Java](#java). Most java steps, like `licenseHeader` and `importOrder`, support Groovy as well as Java. -The groovy formatter's default behavior is to format all `.groovy` and `.java` files found in the Groovy source directories. If you would like to exclude the `.java` files, set the parameter `excludeJava` to `true`, or you can set the `target` parameter as described in the [Custom rules](#custom) section. +The groovy formatter's default behavior is to format all `.groovy` and `.java` files found in the Groovy source directories. If you would like to exclude the `.java` files, set the parameter `excludeJava`, or you can set the `target` parameter as described in the [Custom rules](#custom) section. ```gradle apply plugin: 'groovy' @@ -153,11 +153,11 @@ spotless { } groovy { licenseHeaderFile 'spotless.license.java' - excludeJava // excludes all Java sources within the Groovy source dirs from formatting + excludeJava() // excludes all Java sources within the Groovy source dirs from formatting // the Groovy Eclipse formatter extends the Java Eclipse formatter, // so it formats Java files by default (unless `excludeJava` is used). - greclipseFormatFile 'greclipse.properties' + greclipse().configFile('greclipse.properties') } } ``` @@ -167,10 +167,10 @@ The [Groovy-Eclipse](https://github.com/groovy/groovy-eclipse) formatter is base ```gradle spotless { groovy { - // Use the default version and default Groovy-Eclipse default configuration - greclipseFormat() + // Use the default version and Groovy-Eclipse default configuration + greclipse() // optional: you can specify a specific version or config file(s) - greclipseFormat('2.3.0').configFile(spotless.eclipseformat.xml', 'org.codehaus.groovy.eclipse.ui.prefs') + greclipse('2.3.0').configFile('spotless.eclipseformat.xml', 'org.codehaus.groovy.eclipse.ui.prefs') } } ```