mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 15:51:38 +00:00
[Java][native] add spotless gradle/mvn plugin (#14641)
* add spotless plugin to java native client * apply spotless * Revert "apply spotless" This reverts commit 485d50bbde417044f8aabaef76dee906afc6798c.
This commit is contained in:
@@ -127,6 +127,46 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Use spotless plugin to automatically format code, remove unused import, etc
|
||||
To apply changes directly to the file, run `mvn spotless:apply`
|
||||
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${spotless.version}</version>
|
||||
<configuration>
|
||||
<formats>
|
||||
<!-- you can define as many formats as you want, each is independent -->
|
||||
<format>
|
||||
<!-- define the files to apply to -->
|
||||
<includes>
|
||||
<include>.gitignore</include>
|
||||
</includes>
|
||||
<!-- define the steps to apply to those files -->
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
<indent>
|
||||
<spaces>true</spaces> <!-- or <tabs>true</tabs> -->
|
||||
<spacesPerTab>4</spacesPerTab> <!-- optional, default is 4 -->
|
||||
</indent>
|
||||
</format>
|
||||
</formats>
|
||||
<!-- define a language-specific format -->
|
||||
<java>
|
||||
<!-- no need to specify files, inferred automatically, but you can if you want -->
|
||||
|
||||
<!-- apply a specific flavor of google-java-format and reflow long strings -->
|
||||
<googleJavaFormat>
|
||||
<version>1.8</version>
|
||||
<style>AOSP</style>
|
||||
<reflowLongStrings>true</reflowLongStrings>
|
||||
</googleJavaFormat>
|
||||
<removeUnusedImports/>
|
||||
<importOrder/>
|
||||
</java>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -218,5 +258,6 @@
|
||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||
<httpmime-version>4.5.13</httpmime-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<spotless.version>2.27.2</spotless.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user