-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (68 loc) · 2.17 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektPlugin
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
buildscript {
apply from: "$rootDir/team-props/git-hooks/git-hooks.gradle.kts"
dependencies {
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'io.gitlab.arturbosch.detekt' version '1.22.0' apply false
id 'nl.neotech.plugin.rootcoverage' version '1.6.0'
}
tasks.register("clean", Delete) {
delete(rootProject.buildDir)
}
tasks.register("reportMerge", ReportMergeTask) {
output = project.layout.buildDirectory.file("reports/detekt/merge.xml")
}
rootCoverage {
buildVariant "debug"
excludes = [
"**/bumptech/glide/*.*",
"androidx/**/*.class",
"**/*Test*.*",
"**/*Application*.*",
"**/*Activity*.*",
"**/*Fragment*.*",
"**/*Adapter*.*",
"**/*Dialog*.*",
"**/*Args*.*",
"**/*Companion*.*",
"**/*Binder*.*",
"**/auth/sample/**/*"
]
generateCsv false
generateHtml true
generateXml false
executeAndroidTests false
executeUnitTests true
includeAndroidTestResults false
includeUnitTestResults true
}
allprojects {
apply from: "$rootDir/team-props/formatting/ktlint.gradle"
apply from: "$rootDir/ext.gradle"
apply plugin: "io.gitlab.arturbosch.detekt"
tasks.withType(Detekt).configureEach {
config.setFrom("$rootDir/team-props/lint/detekt/detekt.yml")
jvmTarget = "1.8"
reports {
xml.required.set(true)
html.required.set(true)
}
}
plugins.withType(DetektPlugin) {
tasks.withType(Detekt) { detektTask ->
finalizedBy(reportMerge)
reportMerge.configure { mergeTask ->
mergeTask.input.from(detektTask.xmlReportFile)
}
}
}
}