-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor spotless formatting file out of build.gradle
Signed-off-by: Daniel Widdis <[email protected]>
- Loading branch information
Showing
2 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
allprojects { | ||
spotless { | ||
java { | ||
// Normally this isn't necessary, but we have Java sources in | ||
// non-standard places | ||
target '**/*.java' | ||
|
||
removeUnusedImports() | ||
importOrder 'java', 'javax', 'org', 'com' | ||
eclipse().configFile rootProject.file('formatter/formatterConfig.xml') | ||
trimTrailingWhitespace() | ||
endWithNewline(); | ||
|
||
// See DEVELOPER_GUIDE.md for details of when to enable this. | ||
if (System.getProperty('spotless.paddedcell') != null) { | ||
paddedCell() | ||
} | ||
} | ||
format 'misc', { | ||
target '*.md', '*.gradle', '**/*.json', '**/*.yaml', '**/*.yml', '**/*.svg' | ||
|
||
trimTrailingWhitespace() | ||
endWithNewline() | ||
} | ||
format("license", { | ||
licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package "); | ||
target("src/*/java/**/*.java") | ||
}) | ||
} | ||
} |