forked from detekt/detekt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
59 lines (50 loc) · 1.51 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
55
56
57
58
59
plugins {
kotlin("jvm") apply false
jacoco
packaging
releasing
detekt
id("org.jetbrains.dokka") apply false
id("com.github.johnrengelman.shadow") apply false
id("com.github.ben-manes.versions")
id("org.sonarqube")
id("binary-compatibility-validator")
}
repositories {
jcenter()
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
allprojects {
group = "io.gitlab.arturbosch.detekt"
version = Versions.currentOrSnapshot()
}
jacoco.toolVersion = Versions.JACOCO
val examplesOrTestUtils = setOf(
"detekt-bom",
"detekt-test",
"detekt-test-utils",
"detekt-sample-extensions"
)
tasks {
jacocoTestReport {
executionData.setFrom(fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec"))
subprojects
.filterNot { it.name in examplesOrTestUtils }
.forEach {
this@jacocoTestReport.sourceSets(it.sourceSets.main.get())
this@jacocoTestReport.dependsOn(it.tasks.test)
}
reports {
xml.isEnabled = true
xml.destination = file("$buildDir/reports/jacoco/report.xml")
}
}
}
apiValidation {
// We need to perform api validations for external APIs, for :detekt-api and :detekt-psi-utils
ignoredProjects.addAll(subprojects.filter { it.name !in listOf("detekt-api", "detekt-psi-utils") }.map { it.name })
ignoredPackages.add("io.gitlab.arturbosch.detekt.api.internal")
}