Skip to content

Commit

Permalink
Minor corrections to groovy section of plugin-gradle/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Apr 9, 2017
1 parent d78a2b6 commit 5a863b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugin-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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')
}
}
```
Expand All @@ -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')
}
}
```
Expand Down

0 comments on commit 5a863b9

Please sign in to comment.