@@ -80,6 +80,7 @@ plugins.withType(JavaPlugin) {
80
80
}
81
81
82
82
test {
83
+ maxParallelForks = Math . max(1 , (int )(Runtime . getRuntime(). availableProcessors() / 4 ))
83
84
jacoco {
84
85
excludes = [' **/package-info**' ,' **/*Test' ]
85
86
destinationFile = file(" $buildDir /reports/jacoco/test.exec" )
@@ -89,26 +90,25 @@ test {
89
90
setBinResultsDir(file(" ${ buildDir} /reports/tests/bin" ))
90
91
}
91
92
92
- build. dependsOn( " jacocoTestReport" );
93
+ build. dependsOn jacocoTestReport
93
94
94
95
jacocoTestReport {
95
96
doFirst {
96
- classDirectories = fileTree(dir : ' build/classes/main' , include : ' org/threadly/**' )
97
- sourceDirectories = fileTree(dir : ' scr /main/java' , include : ' org/threadly/**' )
97
+ classDirectories = fileTree(dir : ' build/classes/java/ main' , include : ' org/threadly/**' )
98
+ sourceDirectories = fileTree(dir : ' src /main/java' , include : ' org/threadly/**' )
98
99
}
99
100
reports {
100
101
csv. enabled = false
101
102
xml. enabled = true
102
- xml. destination = file(" ${ buildDir} /reports/jacoco/jacoco.xml" )
103
+ xml. destination = file(" $buildDir /reports/jacoco/jacoco.xml" )
103
104
html. enabled = true
104
- html. destination = file(" ${ buildDir} /reports/jacoco/html" )
105
+ html. destination = file(" $buildDir /reports/jacoco/html" )
105
106
}
106
107
doLast {
107
108
println " Test results available at:"
108
109
println " html - $buildDir /reports/tests/html/index.html"
109
110
println " Test coverage reports available at:"
110
111
println " html - $buildDir /reports/jacoco/html/index.html"
111
- println " xml - $buildDir /reports/jacoco/jacoco.xml"
112
112
}
113
113
}
114
114
0 commit comments