-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathktlint.gradle
More file actions
32 lines (27 loc) · 807 Bytes
/
ktlint.gradle
File metadata and controls
32 lines (27 loc) · 807 Bytes
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
repositories {
jcenter()
}
configurations {
ktlint
}
dependencies {
ktlint "com.github.shyiko:ktlint:0.29.0"
}
task installKtlintIdeaProject(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args = ["--apply-to-idea-project", "-y"]
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args = ["src/**/*.kt"]
}
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.github.shyiko.ktlint.Main"
args = ["-F", "src/**/*.kt"]
}