-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
47 lines (41 loc) · 1.48 KB
/
build.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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(Dependencies.Classpaths.GOOGLE_SERVICES)
classpath(Dependencies.Classpaths.NAVIGATION)
classpath(Dependencies.Classpaths.HILT)
classpath(Dependencies.Classpaths.CRASHLYTICS)
classpath(Dependencies.Classpaths.JUNIT5)
classpath(Dependencies.Classpaths.JACOCO)
}
}
plugins {
id("com.android.application") version Dependencies.Versions.ANDROID apply false
id("com.android.library") version Dependencies.Versions.ANDROID apply false
id("org.jetbrains.kotlin.android") version Dependencies.Versions.KOTLIN apply false
id("org.jetbrains.kotlin.jvm") version Dependencies.Versions.KOTLIN apply false
}
subprojects {
val ktlint by configurations.creating
dependencies {
ktlint("com.pinterest:ktlint:0.47.1")
}
tasks.register<JavaExec>("ktlint") {
group = "verification"
description = "Check Kotlin code style."
mainClass.set("com.pinterest.ktlint.Main")
classpath = ktlint
args("--android", "src/**/*.kt")
}
tasks.register<JavaExec>("ktlintFormat") {
group = "formatting"
description = "Fix Kotlin code style deviations."
mainClass.set("com.pinterest.ktlint.Main")
classpath = ktlint
args("--android", "-F", "src/**/*.kt")
}
}