-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
54 lines (45 loc) · 1.45 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
plugins {
id("com.android.application").version("7.2.2").apply(false)
id("com.android.library").version("7.2.2").apply(false)
id("org.jetbrains.kotlin.android").version("1.7.10").apply(false)
id("io.gitlab.arturbosch.detekt") version "1.21.0"
}
buildscript {
repositories {
google()
}
dependencies {
val navVersion = "2.5.2"
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$navVersion")
}
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
}
allprojects {
apply {
plugin("io.gitlab.arturbosch.detekt")
}
detekt {
toolVersion = "1.21.0"
parallel = true
baseline = file("${rootDir}/config/detekt/baseline.xml")
config = files("${rootDir}/config/detekt/detekt.yml")
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
val detektProjectBaseline by tasks.registering(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask::class) {
description = "Overrides current baseline."
parallel.set(true)
setSource(files(rootDir))
config.setFrom(files("$rootDir/config/detekt/detekt.yml"))
baseline.set(file("$rootDir/config/detekt/baseline.xml"))
}
tasks.register("installGitHook", Copy::class) {
from(file("$rootDir/githooks/pre-commit"))
into(file("$rootDir/.git/hooks"))
fileMode = 0b111111111
}
tasks.getByPath(":app:preBuild").dependsOn(":installGitHook")