|
79 | 79 | <logback.version>1.6.3</logback.version> |
80 | 80 | <version.testcontainers>2.0.5</version.testcontainers> |
81 | 81 | <error-prone.version>2.50.0</error-prone.version> |
| 82 | + <spotless-maven-plugin.version>3.10.4</spotless-maven-plugin.version> |
| 83 | + <google-java-format.version>1.37.0</google-java-format.version> |
82 | 84 | <nullaway.version>0.14.1</nullaway.version> |
83 | 85 | <error-prone.flag>-XDaddTypeAnnotationsToSymbol=true</error-prone.flag> |
84 | 86 | <nullaway.args>-Xplugin:ErrorProne -XepDisableAllChecks -Xep:NullAway:ERROR -Xep:RequireExplicitNullMarking:WARN -XepOpt:NullAway:ExhaustiveOverride=true -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:JSpecifyMode=true -XepExcludedPaths:.*/src/test/.* -XepDisableWarningsInGeneratedCode</nullaway.args> |
| 87 | + <skip.spotless>true</skip.spotless> |
85 | 88 |
|
86 | 89 | <!-- Redirect test output to file --> |
87 | 90 | <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile> |
|
588 | 591 | </execution> |
589 | 592 | </executions> |
590 | 593 | </plugin> |
| 594 | + <plugin> |
| 595 | + <groupId>com.diffplug.spotless</groupId> |
| 596 | + <artifactId>spotless-maven-plugin</artifactId> |
| 597 | + <version>${spotless-maven-plugin.version}</version> |
| 598 | + </plugin> |
591 | 599 | </plugins> |
592 | 600 | </pluginManagement> |
593 | 601 | <plugins> |
|
604 | 612 | <artifactId>central-publishing-maven-plugin</artifactId> |
605 | 613 | </plugin> |
606 | 614 | <plugin> |
607 | | - <groupId>org.apache.maven.plugins</groupId> |
608 | | - <artifactId>maven-checkstyle-plugin</artifactId> |
609 | | - <version>${maven-checkstyle-plugin.version}</version> |
610 | | - <dependencies> |
611 | | - <dependency> |
612 | | - <groupId>com.puppycrawl.tools</groupId> |
613 | | - <artifactId>checkstyle</artifactId> |
614 | | - <version>${checkstyle.version}</version> |
615 | | - </dependency> |
616 | | - </dependencies> |
| 615 | + <groupId>com.diffplug.spotless</groupId> |
| 616 | + <artifactId>spotless-maven-plugin</artifactId> |
| 617 | + <configuration> |
| 618 | + <skip>${skip.spotless}</skip> |
| 619 | + <formats> |
| 620 | + <!-- you can define as many formats as you want, each is independent --> |
| 621 | + <format> |
| 622 | + <!-- define the files to apply to --> |
| 623 | + <includes> |
| 624 | + <include>.gitignore</include> |
| 625 | + </includes> |
| 626 | + <!-- define the steps to apply to those files --> |
| 627 | + <trimTrailingWhitespace/> |
| 628 | + <endWithNewline/> |
| 629 | + <indent> |
| 630 | + <spaces>true</spaces> |
| 631 | + <spacesPerTab>4</spacesPerTab> |
| 632 | + </indent> |
| 633 | + </format> |
| 634 | + </formats> |
| 635 | + <!-- define a language-specific format --> |
| 636 | + <java> |
| 637 | + <includes> |
| 638 | + <include>**/src/main/java/**/*.java</include> |
| 639 | + <include>**/src/test/java/**/*.java</include> |
| 640 | + </includes> |
| 641 | + <googleJavaFormat> |
| 642 | + <version>1.36.1</version> |
| 643 | + <style>AOSP</style> |
| 644 | + <reflowLongStrings>true</reflowLongStrings> |
| 645 | + <formatJavadoc>false</formatJavadoc> |
| 646 | + </googleJavaFormat> |
| 647 | + <importOrder/> |
| 648 | + <shortenFullyQualifiedTypes/> |
| 649 | + <importOrder/> |
| 650 | + <removeUnusedImports/> |
| 651 | + <indent> |
| 652 | + <spaces>true</spaces> |
| 653 | + <spacesPerTab>4</spacesPerTab> |
| 654 | + </indent> |
| 655 | + </java> |
| 656 | + <pom> |
| 657 | + <includes> |
| 658 | + <include>pom.xml</include> |
| 659 | + <include>**/pom.xml</include> |
| 660 | + </includes> |
| 661 | + <sortPom> |
| 662 | + <encoding>UTF-8</encoding> |
| 663 | + <expandEmptyElements>false</expandEmptyElements> |
| 664 | + <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement> |
| 665 | + <keepBlankLines>true</keepBlankLines> |
| 666 | + <nrOfIndentSpace>4</nrOfIndentSpace> |
| 667 | + <indentBlankLines>false</indentBlankLines> |
| 668 | + <indentSchemaLocation>false</indentSchemaLocation> |
| 669 | + <predefinedSortOrder>recommended_2008_06</predefinedSortOrder> |
| 670 | + <sortPlugins>groupId,artifactId</sortPlugins> |
| 671 | + <sortProperties>true</sortProperties> |
| 672 | + <sortModules>false</sortModules> |
| 673 | + <sortExecutions>false</sortExecutions> |
| 674 | + </sortPom> |
| 675 | + </pom> |
| 676 | + <markdown> |
| 677 | + <includes> |
| 678 | + <!-- You have to set the target manually --> |
| 679 | + <include>docs/**/*.md</include> |
| 680 | + <include>CODE_OF_CONDUCT.md</include> |
| 681 | + <include>CONTRIBUTING.md</include> |
| 682 | + <include>CONTRIBUTING_INTEGRATIONS.md</include> |
| 683 | + <include>README.md</include> |
| 684 | + <include>RELEASE.md</include> |
| 685 | + <include>SECURITY.md</include> |
| 686 | + </includes> |
| 687 | + <flexmark> |
| 688 | + <emulationProfile>COMMONMARK</emulationProfile> |
| 689 | + <pegdownExtensions>ALL,TOC</pegdownExtensions> |
| 690 | + <extensions>YamlFrontMatter,Emoji</extensions> |
| 691 | + <formatterOptions> |
| 692 | + <rightMargin>120</rightMargin> |
| 693 | + </formatterOptions> |
| 694 | + </flexmark> |
| 695 | + </markdown> |
| 696 | + </configuration> |
617 | 697 | <executions> |
618 | 698 | <execution> |
619 | | - <id>checkstyle-validation</id> |
620 | | - <phase>validate</phase> |
621 | | - <inherited>true</inherited> |
622 | | - <configuration> |
623 | | - <skip>false</skip> |
624 | | - <configLocation>src/checkstyle/checkstyle.xml</configLocation> |
625 | | - <includeTestSourceDirectory>true</includeTestSourceDirectory> |
626 | | - <consoleOutput>true</consoleOutput> |
627 | | - <failsOnError>false</failsOnError> |
628 | | - <failOnViolation>${checkstyle.failOnViolation}</failOnViolation> |
629 | | - </configuration> |
630 | 699 | <goals> |
631 | 700 | <goal>check</goal> |
632 | 701 | </goals> |
| 702 | + <phase>compile</phase> |
633 | 703 | </execution> |
634 | 704 | </executions> |
635 | 705 | </plugin> |
|
0 commit comments