Skip to content

Commit

Permalink
Merge pull request #68 from MarkEWaite/use-spotless-not-tidy
Browse files Browse the repository at this point in the history
Use spotless instead of tidy for formatting
  • Loading branch information
MarkEWaite authored Dec 11, 2021
2 parents 5a92ee6 + 21efdd5 commit 0078580
Showing 1 changed file with 41 additions and 49 deletions.
90 changes: 41 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,56 +84,48 @@
</pluginRepositories>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.17.6</version>
<configuration>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically -->
<!-- apply a specific flavor of google-java-format -->
<googleJavaFormat>
<!-- Blocked at 1.7 until Java 8 google-java-format is no longer required -->
<version>1.7</version>
<style>AOSP</style>
</googleJavaFormat>
<endWithNewline></endWithNewline>
<removeUnusedImports></removeUnusedImports>
</java>
<pom>
<indent>
<spaces>true</spaces>
</indent>
<includes>
<include>pom.xml</include>
</includes>
<sortPom></sortPom>
</pom>
</configuration>
<executions>
<execution>
<!-- Runs in verify phase by default -->
<goals>
<!-- Can be disabled using -Dspotless.check.skip -->
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Fail build on pom formatting errors -->
<!-- Fix with mvn tidy:pom -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tidy-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>validate</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.17.6</version>
<configuration>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically -->
<!-- apply a specific flavor of google-java-format -->
<googleJavaFormat>
<!-- Blocked at 1.7 until Java 8 google-java-format is no longer required -->
<version>1.7</version>
<style>AOSP</style>
</googleJavaFormat>
</java>
<pom>
<indent>
<spaces>true</spaces>
</indent>
<includes>
<include>pom.xml</include>
</includes>
<sortPom></sortPom>
</pom>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
Expand Down

0 comments on commit 0078580

Please sign in to comment.