This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle.kts
54 lines (47 loc) · 1.47 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
48
49
50
51
52
53
54
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(group = "com.android.tools.build", name = "gradle", version = Versions.gradleTools)
classpath(kotlin("gradle-plugin", version = Versions.kotlin))
classpath("com.google.dagger:hilt-android-gradle-plugin:${Versions.daggerHilt}")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
kotlin("jvm") version Versions.kotlin
id("io.gitlab.arturbosch.detekt") version "1.17.1"
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
ktlint {
android.set(true)
// disable lexicographic import ordering rule
disabledRules.set(listOf("import-ordering", "indent"))
}
apply(plugin = "io.gitlab.arturbosch.detekt")
detekt {
buildUponDefaultConfig = true
config = files(
when (name) {
"sample" -> projectDir.canonicalPath
else -> project.rootDir.canonicalPath
} + File.separator + "detekt-config.yml"
)
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
Publishing.setupSigning(project)