-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
54 lines (47 loc) · 1.58 KB
/
build.gradle
File metadata and controls
54 lines (47 loc) · 1.58 KB
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
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
buildscript {
ext {
compose_version = '1.2.0'
room_version = '2.4.3'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
id 'io.gitlab.arturbosch.detekt' version '1.21.0' apply false
}
task detektMergeReport(type: ReportMergeTask) {
output = project.layout.buildDirectory.file('reports/detekt/merged.sarif')
}
allprojects {
apply {
plugin 'io.gitlab.arturbosch.detekt'
}
dependencies {
detektPlugins 'io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0'
}
detekt {
config = files("${rootProject.rootDir}/detekt.yml")
buildUponDefaultConfig true
tasks.withType(Detekt) { d ->
finalizedBy(detektMergeReport)
detektMergeReport.configure { m ->
m.input.from(d.sarifReportFile)
}
}
}
}
task connectedAndroidTestCollectReports(type: Copy) {
subprojects.forEach { p ->
with copySpec {
from p.layout.buildDirectory.file('outputs/androidTest-results/connected/test-result.pb')
rename "test-result.pb", "${p.name}-test-result.pb"
}
}
into rootProject.layout.buildDirectory.dir('outputs/androidTest')
}
task clean(type: Delete) {
delete rootProject.buildDir
}