Add spotless
plugin (#2537)
* Adds the `spotless` plugin * Excludes `Java17` files Excludes: - Java17RecordTest.java - Java17RecordReflectionTest.java * Fixes formatting in `pom.xml`
This commit is contained in:
parent
c2a0e4634a
commit
d58e2c9382
43
pom.xml
43
pom.xml
|
@ -124,6 +124,49 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- Spotless plugin: keeps the code formatted following the google-java-styleguide -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.diffplug.spotless</groupId>
|
||||||
|
<artifactId>spotless-maven-plugin</artifactId>
|
||||||
|
<version>2.40.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<formats>
|
||||||
|
<format>
|
||||||
|
<includes>
|
||||||
|
<include>*.md</include>
|
||||||
|
<include>.gitignore</include>
|
||||||
|
</includes>
|
||||||
|
<trimTrailingWhitespace/>
|
||||||
|
<endWithNewline/>
|
||||||
|
<indent>
|
||||||
|
<spaces>true</spaces>
|
||||||
|
<spacesPerTab>4</spacesPerTab>
|
||||||
|
</indent>
|
||||||
|
</format>
|
||||||
|
</formats>
|
||||||
|
<java>
|
||||||
|
<excludes>
|
||||||
|
<exclude>src/test/java/com/google/gson/functional/Java17RecordTest.java</exclude>
|
||||||
|
<exclude>src/test/java/com/google/gson/native_test/Java17RecordReflectionTest.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
<googleJavaFormat>
|
||||||
|
<style>GOOGLE</style>
|
||||||
|
<reflowLongStrings>true</reflowLongStrings>
|
||||||
|
<formatJavadoc>true</formatJavadoc>
|
||||||
|
</googleJavaFormat>
|
||||||
|
<importOrder/>
|
||||||
|
<removeUnusedImports/>
|
||||||
|
<formatAnnotations/> <!-- Puts type annotations immediately before types. -->.
|
||||||
|
</java>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user