forked from opensearch-project/flow-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
formatting.gradle
45 lines (42 loc) · 1.65 KB
/
formatting.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
allprojects {
spotless {
java {
// Normally this isn't necessary, but we have Java sources in
// non-standard places
target '**/*.java'
removeUnusedImports()
importOrder(
'de.thetaphi',
'com.carrotsearch',
'com.fasterxml',
'com.avast',
'com.sun',
'com.maxmind|com.github|com.networknt|groovy|nebula',
'org.antlr',
'software.amazon',
'com.azure|com.microsoft|com.ibm|com.google|joptsimple|org.apache|org.bouncycastle|org.codehaus|org.opensearch|org.objectweb|org.joda|org.hamcrest|org.openjdk|org.gradle|org.junit',
'javax',
'java',
'',
'\\#java|\\#org.opensearch|\\#org.hamcrest|\\#'
)
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()
indentWithSpaces()
}
format("license", {
licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package ");
target("src/*/java/**/*.java")
})
}
}