-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (46 loc) · 1.28 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
import org.cadixdev.gradle.licenser.LicenseExtension
plugins {
base
jacoco
id("org.cadixdev.licenser") version "0.6.0" apply false
}
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "org.cadixdev.licenser")
configure<LicenseExtension> {
exclude {
it.file.startsWith(project.buildDir)
}
header(rootProject.file("HEADER.txt"))
(this as ExtensionAware).extra.apply {
for (key in listOf("organization", "url")) {
set(key, rootProject.property(key))
}
}
}
}
tasks.register<JacocoReport>("jacocoTotalReport") {
reports {
xml.isEnabled = true
xml.destination = rootProject.buildDir.resolve("reports/jacoco/report.xml")
html.isEnabled = true
}
subprojects.forEach { proj ->
proj.plugins.withId("java") {
proj.plugins.withId("jacoco") {
executionData(
fileTree(proj.buildDir.absolutePath).include("**/jacoco/*.exec")
)
sourceSets(proj.the<JavaPluginConvention>().sourceSets["main"])
dependsOn(proj.tasks.named("test"))
}
}
}
}
tasks.named("check") {
dependsOn("jacocoTotalReport")
}