Skip to content

Commit 01ada42

Browse files
Configure Spotless to automatically remove unused imports. (#9042)
1 parent 2c8da75 commit 01ada42

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ def isCI = System.getenv("CI") != null
3535

3636
apply from: "$rootDir/gradle/repositories.gradle"
3737
apply from: "$rootDir/gradle/scm.gradle"
38+
3839
spotless {
3940
// only resolve the spotless dependencies once in the build
4041
predeclareDeps()
4142
}
43+
4244
spotlessPredeclare {
4345
// these need to align with the types and versions in gradle/spotless.gradle
4446
java {
47+
removeUnusedImports()
48+
4549
// This is the last Google Java Format version that supports Java 8
4650
googleJavaFormat('1.7')
4751
}

0 commit comments

Comments
 (0)