mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
41 lines
1.5 KiB
Groovy
41 lines
1.5 KiB
Groovy
spotless {
|
|
java {
|
|
target 'src/**/java/**/*.java'
|
|
if (project.name == 'stirling-pdf') {
|
|
targetExclude 'src/main/resources/static/**', 'src/main/java/org/apache/**'
|
|
} else {
|
|
targetExclude 'src/main/java/org/apache/**'
|
|
}
|
|
|
|
// licenseHeaderFile(file('config/license-header.txt')).updateYearWithLatest(true).yearStringFormat('%s')
|
|
// The google-java-format import remover relies on javac internals that
|
|
// change between JDK releases. JavaParser keeps this step independent
|
|
// of the JDK used to run Gradle (the project builds with JDK 25).
|
|
removeUnusedImports('cleanthat-javaparser-unnecessaryimport')
|
|
googleJavaFormat(rootProject.ext.googleJavaFormatVersion).aosp().reorderImports(false).reflowLongStrings().skipJavadocFormatting()
|
|
|
|
importOrder('java', 'javax', 'org', 'com', 'net', 'io', 'jakarta', 'lombok', 'me', 'stirling')
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
yaml {
|
|
target '**/*.yml', '**/*.yaml'
|
|
if (project.name == 'stirling-pdf') {
|
|
targetExclude 'src/main/resources/static/**'
|
|
}
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
format 'gradle', {
|
|
target '**/gradle/*.gradle', '**/*.gradle'
|
|
if (project.name == 'stirling-pdf') {
|
|
targetExclude 'src/main/resources/static/**'
|
|
}
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
}
|