-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathspotless.gradle.kts
54 lines (46 loc) · 1.21 KB
/
spotless.gradle.kts
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
46
47
48
49
50
51
52
53
54
import com.diffplug.gradle.spotless.SpotlessExtension
apply(plugin = "com.diffplug.spotless")
configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
ktlint(versions.ktLint)
.setUseExperimental(true)
.userData(
mapOf(
"continuation_indent_size" to "4",
"indent_size" to "2",
"ij_kotlin_imports_layout" to "*",
"end_of_line" to "lf",
"charset" to "utf-8",
"disabled_rules" to "experimental:package-name,experimental:trailing-comma",
)
)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
format("xml") {
target("**/res/**/*.xml")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
kotlinGradle {
target("**/*.gradle.kts", "*.gradle.kts")
ktlint(versions.ktLint)
.setUseExperimental(true)
.userData(
mapOf(
"continuation_indent_size" to "4",
"indent_size" to "2",
"ij_kotlin_imports_layout" to "*",
"end_of_line" to "lf",
"charset" to "utf-8",
"disabled_rules" to "no-wildcard-imports",
)
)
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}