-
Notifications
You must be signed in to change notification settings - Fork 0
/
ktlint.gradle
33 lines (31 loc) · 1.02 KB
/
ktlint.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
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest:ktlint:0.33.0"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args(
"**/src/**/*.kt",
"**.kts",
"!**/build/**",
// Do not run with option "--log-level=debug" or "--log-level=trace" as the lint violations will be difficult
// to spot between the amount of output lines.
)
}
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args(
"-F",
"**/src/**/*.kt",
"**.kts",
"!**/build/**",
// Do not run with option "--log-level=debug" or "--log-level=trace" as the lint violations will be difficult
// to spot between the amount of output lines.
)
}