forked from loafle/openapi-generator-original
[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:
parent
011982ab9c
commit
687bace3f3
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
group = '{{groupId}}'
|
group = '{{groupId}}'
|
||||||
version = '{{artifactVersion}}'
|
version = '{{artifactVersion}}'
|
||||||
@ -8,6 +9,9 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -85,3 +89,26 @@ dependencies {
|
|||||||
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
// don't need to set target, it is inferred from java
|
||||||
|
// apply a specific flavor of google-java-format
|
||||||
|
googleJavaFormat('1.8').aosp().reflowLongStrings()
|
||||||
|
removeUnusedImports()
|
||||||
|
importOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -134,6 +134,46 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -240,5 +280,6 @@
|
|||||||
{{/useJakartaEe}}
|
{{/useJakartaEe}}
|
||||||
<httpmime-version>4.5.13</httpmime-version>
|
<httpmime-version>4.5.13</httpmime-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>4.13.2</junit-version>
|
||||||
|
<spotless.version>2.27.2</spotless.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
group = 'org.openapitools'
|
group = 'org.openapitools'
|
||||||
version = '0.1.0'
|
version = '0.1.0'
|
||||||
@ -8,6 +9,9 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -79,3 +83,26 @@ dependencies {
|
|||||||
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
// don't need to set target, it is inferred from java
|
||||||
|
// apply a specific flavor of google-java-format
|
||||||
|
googleJavaFormat('1.8').aosp().reflowLongStrings()
|
||||||
|
removeUnusedImports()
|
||||||
|
importOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -127,6 +127,46 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -218,5 +258,6 @@
|
|||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<httpmime-version>4.5.13</httpmime-version>
|
<httpmime-version>4.5.13</httpmime-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>4.13.2</junit-version>
|
||||||
|
<spotless.version>2.27.2</spotless.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
group = 'org.openapitools'
|
group = 'org.openapitools'
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
@ -8,6 +9,9 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -79,3 +83,26 @@ dependencies {
|
|||||||
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
// don't need to set target, it is inferred from java
|
||||||
|
// apply a specific flavor of google-java-format
|
||||||
|
googleJavaFormat('1.8').aosp().reflowLongStrings()
|
||||||
|
removeUnusedImports()
|
||||||
|
importOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -127,6 +127,46 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -218,5 +258,6 @@
|
|||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<httpmime-version>4.5.13</httpmime-version>
|
<httpmime-version>4.5.13</httpmime-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>4.13.2</junit-version>
|
||||||
|
<spotless.version>2.27.2</spotless.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
group = 'org.openapitools'
|
group = 'org.openapitools'
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
@ -8,6 +9,9 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -79,3 +83,26 @@ dependencies {
|
|||||||
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
// don't need to set target, it is inferred from java
|
||||||
|
// apply a specific flavor of google-java-format
|
||||||
|
googleJavaFormat('1.8').aosp().reflowLongStrings()
|
||||||
|
removeUnusedImports()
|
||||||
|
importOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -127,6 +127,46 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -218,5 +258,6 @@
|
|||||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||||
<httpmime-version>4.5.13</httpmime-version>
|
<httpmime-version>4.5.13</httpmime-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>4.13.2</junit-version>
|
||||||
|
<spotless.version>2.27.2</spotless.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
group = 'org.openapitools'
|
group = 'org.openapitools'
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
@ -8,6 +9,9 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -79,3 +83,26 @@ dependencies {
|
|||||||
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
|
||||||
testImplementation "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
// don't need to set target, it is inferred from java
|
||||||
|
// apply a specific flavor of google-java-format
|
||||||
|
googleJavaFormat('1.8').aosp().reflowLongStrings()
|
||||||
|
removeUnusedImports()
|
||||||
|
importOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -127,6 +127,46 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -218,5 +258,6 @@
|
|||||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||||
<httpmime-version>4.5.13</httpmime-version>
|
<httpmime-version>4.5.13</httpmime-version>
|
||||||
<junit-version>4.13.2</junit-version>
|
<junit-version>4.13.2</junit-version>
|
||||||
|
<spotless.version>2.27.2</spotless.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user