Skip to content

Commit aaccb9e

Browse files
authored
Merge pull request #14 from cisco-open/add_jacocoTestReport
Add jacoco covg reports
2 parents 96d6dc8 + 59e1320 commit aaccb9e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'java'
3+
id 'jacoco'
34
id 'java-library'
45
}
56

@@ -45,6 +46,19 @@ dependencies {
4546

4647
test {
4748
useTestNG()
49+
finalizedBy jacocoTestReport
50+
}
51+
52+
jacocoTestReport {
53+
additionalSourceDirs.from = files(sourceSets.main.allSource.srcDirs)
54+
sourceDirectories.from = files(sourceSets.main.allSource.srcDirs)
55+
classDirectories.from = files(sourceSets.main.output)
56+
reports {
57+
html.enabled = true
58+
xml.enabled = true
59+
xml.destination = file("${buildDir}/jacoco/test.xml")
60+
csv.enabled = false
61+
}
4862
}
4963

5064
task fatJar(type: Jar) {

0 commit comments

Comments
 (0)