Skip to content

Commit c836a67

Browse files
committed
Improve documentation
1 parent 8edc1ca commit c836a67

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

plugin-gradle/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,17 @@ spotless {
180180
target 'src/*/java/**/*.java'
181181
```
182182

183+
### removeUnusedImports
184+
185+
```
186+
spotless {
187+
java {
188+
removeUnusedImports()
189+
// optional: you may switch for `google-java-format` as underlying engine to `cleanthat-javaparser-unnecessaryimport`
190+
// which enables processing any language level source file with a JDK8+ Runtime
191+
removeUnusedImports().engine('cleanthat-javaparser-unnecessaryimport')
192+
```
193+
183194
### google-java-format
184195

185196
[homepage](https://github.com/google/google-java-format). [changelog](https://github.com/google/google-java-format/releases).

plugin-maven/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ any other maven phase (i.e. compile) then it can be configured as below;
207207
</configuration>
208208
```
209209

210+
### removeUnusedImports
211+
212+
```xml
213+
<removeUnusedImports>
214+
<engine>google-java-format</engine> <!-- optional. Defaults to `google-java-format`. Can be switched to `cleanthat-javaparser-unnecessaryimport` (e.g. to process JDK17 source files with a JDK8+ Runtime) -->
215+
</removeUnusedImports>
216+
```
217+
210218
### google-java-format
211219

212220
[homepage](https://github.com/google/google-java-format). [changelog](https://github.com/google/google-java-format/releases). [code](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/GoogleJavaFormat.java).

0 commit comments

Comments
 (0)