|
39 | 39 | <hamcrest.version>2.2</hamcrest.version> |
40 | 40 | <okhttp3.version>4.4.1</okhttp3.version> |
41 | 41 | <okio.version>2.5.0</okio.version> |
42 | | - <formatter-maven-plugin.goal>format</formatter-maven-plugin.goal> |
43 | | - <impsort-maven-plugin.goal>sort</impsort-maven-plugin.goal> |
| 42 | + <spotless-maven-plugin.goal>apply</spotless-maven-plugin.goal> |
44 | 43 | <!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. --> |
45 | 44 | <jacoco.coverage.target.bundle.method>0.60</jacoco.coverage.target.bundle.method> |
46 | 45 | <jacoco.coverage.target.class.method>0.25</jacoco.coverage.target.class.method> |
|
343 | 342 | </executions> |
344 | 343 | </plugin> |
345 | 344 | <plugin> |
346 | | - <groupId>net.revelc.code.formatter</groupId> |
347 | | - <artifactId>formatter-maven-plugin</artifactId> |
348 | | - <version>2.12.1</version> |
| 345 | + <groupId>com.diffplug.spotless</groupId> |
| 346 | + <artifactId>spotless-maven-plugin</artifactId> |
| 347 | + <version>2.6.1</version> |
349 | 348 | <executions> |
350 | 349 | <execution> |
| 350 | + <id>spotless-check</id> |
| 351 | + <phase>process-sources</phase> |
351 | 352 | <goals> |
352 | | - <goal>${formatter-maven-plugin.goal}</goal> |
| 353 | + <goal>${spotless-maven-plugin.goal}</goal> |
353 | 354 | </goals> |
354 | | - <configuration> |
355 | | - <configFile>src/main/resources/eclipse/formatter.xml</configFile> |
356 | | - <cachedir>${project.build.directory}/.cache</cachedir> |
357 | | - </configuration> |
358 | 355 | </execution> |
359 | 356 | </executions> |
360 | | - </plugin> |
361 | | - <plugin> |
362 | | - <groupId>net.revelc.code</groupId> |
363 | | - <artifactId>impsort-maven-plugin</artifactId> |
364 | | - <version>1.4.1</version> |
365 | 357 | <configuration> |
366 | | - <groups>*,java.,javax.</groups> |
367 | | - <removeUnused>true</removeUnused> |
368 | | - <staticAfter>true</staticAfter> |
| 358 | + <java> |
| 359 | + <eclipse> |
| 360 | + <file>${basedir}/src/build/eclipse/formatter.xml</file> |
| 361 | + </eclipse> |
| 362 | + |
| 363 | + <importOrder> |
| 364 | + <file>${basedir}/src/build/eclipse/eclipse.importorder</file> |
| 365 | + </importOrder> |
| 366 | + <removeUnusedImports /> |
| 367 | + </java> |
369 | 368 | </configuration> |
370 | | - <executions> |
371 | | - <execution> |
372 | | - <goals> |
373 | | - <goal>${impsort-maven-plugin.goal}</goal> |
374 | | - </goals> |
375 | | - </execution> |
376 | | - </executions> |
377 | 369 | </plugin> |
378 | 370 | <plugin> |
379 | 371 | <groupId>com.github.spotbugs</groupId> |
|
595 | 587 | </os> |
596 | 588 | </activation> |
597 | 589 | <properties> |
598 | | - <formatter-maven-plugin.goal>validate</formatter-maven-plugin.goal> |
599 | | - <impsort-maven-plugin.goal>check</impsort-maven-plugin.goal> |
| 590 | + <spotless-maven-plugin.goal>check</spotless-maven-plugin.goal> |
600 | 591 | </properties> |
601 | 592 | </profile> |
602 | 593 | <profile> |
|
621 | 612 | <profile> |
622 | 613 | <id>release</id> |
623 | 614 | <properties> |
624 | | - <formatter-maven-plugin.goal>validate</formatter-maven-plugin.goal> |
625 | | - <impsort-maven-plugin.goal>check</impsort-maven-plugin.goal> |
| 615 | + <spotless-maven-plugin.goal>check</spotless-maven-plugin.goal> |
626 | 616 | </properties> |
627 | 617 | <build> |
628 | 618 | <plugins> |
|
0 commit comments