-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
50 lines (45 loc) · 1.41 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
buildscript {
repositories {
mavenCentral()
}
configurations.classpath {
resolutionStrategy {
// SEE: https://github.com/GoogleContainerTools/jib/issues/3058
force("org.apache.httpcomponents:httpcore:4.4.12")
force("org.apache.httpcomponents:httpclient:4.5.10")
force("com.google.http-client:google-http-client:1.34.0")
force("com.google.http-client:google-http-client-apache-v2:1.34.0")
}
}
}
repositories {
mavenLocal()
mavenCentral()
}
plugins {
idea
jacoco
alias(libs.plugins.com.github.ben.manes.versions)
alias(libs.plugins.nl.littlerobots.version.catalog.update)
}
tasks {
register<JacocoReport>("mergeJacocoReports") {
val javaSourceSets = subprojects.mapNotNull {
it.extensions.findByType(JavaPluginExtension::class)?.sourceSets?.getByName("main")
}
sourceSets(*javaSourceSets.toTypedArray())
executionData.setFrom(fileTree(rootDir).include("**/build/jacoco/*.exec"))
classDirectories.setFrom(files(javaSourceSets.map { it.output }))
sourceDirectories.setFrom(files(javaSourceSets.map { it.allSource.srcDirs }))
reports {
xml.apply {
required.set(true)
outputLocation.set(file("${layout.buildDirectory.get()}/reports/jacoco/xml/coverage.xml"))
}
html.apply {
required.set(true)
outputLocation.set(file("${layout.buildDirectory.get()}/reports/jacoco/html"))
}
}
}
}