Skip to content

Commit

Permalink
chore: added spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Dankoy committed May 6, 2024
1 parent 36c6b07 commit ce21cf9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.5'
id 'com.diffplug.spotless' version '6.25.0'
}

apply plugin: "io.spring.dependency-management"
Expand Down Expand Up @@ -60,6 +61,9 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.liquibase:liquibase-core'

// spotless
implementation 'com.diffplug.spotless:spotless-lib:2.45.0'
}

test {
Expand All @@ -69,3 +73,21 @@ test {
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}

spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
googleJavaFormat('1.19.2')
.reflowLongStrings()
.formatJavadoc(true)
.reorderImports(false)
.groupArtifact('com.google.googlejavaformat:google-java-format')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}

0 comments on commit ce21cf9

Please sign in to comment.