Skip to content

Commit

Permalink
Introduce gradle gradle spotless for java #771
Browse files Browse the repository at this point in the history
- added sechub eclipse formatter
- added importer order settings
  • Loading branch information
de-jcup committed Feb 8, 2022
1 parent 4c19e81 commit aac78bc
Show file tree
Hide file tree
Showing 5 changed files with 430 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ plugins {
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.openapi.generator' version '5.2.0'
id 'org.springframework.boot' version '2.6.2' apply false
id 'com.diffplug.spotless' version '6.2.1'
}
/* check buildsystem */
def githubActor = System.getenv('GITHUB_ACTOR')
Expand Down Expand Up @@ -64,6 +65,7 @@ task internalCleanRootBuildFolder(type: Delete){
tasks.clean.dependsOn.internalCleanRootBuildFolder

allprojects {
apply from: rootProject.file('gradle/spotless.gradle')

def customMavenRepoURL = System.getenv('CUST_MVN_URL')
if (customMavenRepoURL!=null){
Expand All @@ -76,7 +78,21 @@ allprojects {
}
}


}

spotless {
groovyGradle {
target '*.gradle', 'gradle/*.gradle'
}
format 'dotfiles', {
target '.gitignore', '.gitattributes', '.editorconfig'
indentWithSpaces(2)
trimTrailingWhitespace()
endWithNewline()
}
}

apply from: "${rootProject.projectDir}/build-versioning.gradle"
apply from: "${rootProject.projectDir}/build-java.gradle"
apply from: "${rootProject.projectDir}/build-spring.gradle"
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# =============================================================================
replacePlaceholders=true
org.gradle.jvmargs=-Xmx2048m

Loading

0 comments on commit aac78bc

Please sign in to comment.