forked from songlongGithub/scoped_storage_sample
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathktlink.gradle
More file actions
65 lines (65 loc) · 1.86 KB
/
ktlink.gradle
File metadata and controls
65 lines (65 loc) · 1.86 KB
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
55
56
57
58
59
60
61
62
63
64
65
apply plugin: "org.jlleitschuh.gradle.ktlint"
//import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
ktlint {
android = true
verbose = true
outputToConsole = true
outputColorName = "RED"
enableExperimentalRules = true
ignoreFailures = true
//["final-newline", "max-line-length"]
disabledRules = []
reporters {
reporter "plain"
reporter "checkstyle"
reporter "sarif"
}
}
//ktlint {
// version = "0.22.0"
// debug = true
// verbose = true
// android = false
// outputToConsole = true
// outputColorName = "RED"
// ignoreFailures = true
// enableExperimentalRules = true
// additionalEditorconfigFile = file("/some/additional/.editorconfig")
// disabledRules = ["final-newline"]
// baseline = file("my-project-ktlint-baseline.xml")
// reporters {
// reporter "plain"
// reporter "checkstyle"
// reporter "sarif"
//
// customReporters {
// "csv" {
// fileExtension = "csv"
// dependency = project(":project-reporters:csv-reporter")
// }
// "yaml" {
// fileExtension = "yml"
// dependency = "com.example:ktlint-yaml-reporter:1.0.0"
// }
// }
// }
// kotlinScriptAdditionalPaths {
// include fileTree("scripts/")
// }
// filter {
// exclude("**/generated/**")
// include("**/kotlin/**")
// }
//}
//
//dependencies {
// ktlintRuleset "com.github.username:rulseset:master-SNAPSHOT"
// ktlintRuleset files("/path/to/custom/rulseset.jar")
// ktlintRuleset project(":chore:project-ruleset")
//}
project.afterEvaluate {
if (tasks.findByName("preBuild") != null) {
project.preBuild.dependsOn tasks.findByName("ktlintCheck")
println("project.preBuild.dependsOn tasks.findByName(\"ktlintCheck\")")
}
}