forked from Kynetics/uf-android-client
/
ktlint.gradle
42 lines (36 loc) · 1.04 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
34
35
36
37
38
39
40
41
42
/*
* Copyright © 2017-2023 Kynetics LLC
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
repositories {
mavenCentral()
}
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest:ktlint:0.34.2"}
task checkStyle(type: JavaExec, group: "klint") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "src/**/*.kt"
}
task fixStyle(type: JavaExec, group: "klint") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "-F", "src/**/*.kt"
}
task configureIntellij(type: JavaExec, group: "klint"){
description = "Configure intellij"
classpath = configurations.ktlint
workingDir = project.rootDir
main = "com.pinterest.ktlint.Main"
args "--apply-to-idea-project", "--android", "-y"
}