@@ -20,12 +20,10 @@ buildscript {
2020 dependencies {
2121 classpath " com.ofg:uptodate-gradle-plugin:$uptodateVersion "
2222 classpath " me.tatarka:gradle-retrolambda:$retrolambdaPluginVersion "
23- classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3'
2423 }
2524}
2625
2726apply plugin : " jacoco"
28- apply plugin : ' com.github.kt3k.coveralls'
2927
3028if (JavaVersion . current(). isJava8Compatible()) {
3129 allprojects {
@@ -129,27 +127,24 @@ subprojects {
129127 reports {
130128 html. enabled = true
131129 xml. enabled = true
132- csv. enabled = false
133- // html.destination "${buildDir}/jacocoHtml"
134130 }
135131 }
136132
137-
138- task coverage(dependsOn : [" test" , " jacocoTestReport" ]) << {
139-
140- }
133+ task coverage(dependsOn : [" test" , " jacocoTestReport" ]) << {}
141134
142135}
143136
144137task coverage (type : org.gradle.testing.jacoco.tasks.JacocoReport ) {
145- dependsOn = subprojects. test
146- sourceDirectories = files(subprojects. sourceSets. main. allSource. srcDirs)
147- classDirectories = files(subprojects. sourceSets. main. output)
148- executionData = files(subprojects. jacocoTestReport. executionData)
138+ dependsOn = subprojects. coverage
139+ executionData fileTree(project. rootDir. absolutePath). include(" **/build/jacoco/*.exec" )
140+ // We only care about coverage of:
141+ def projectForFoverage = [" core" , " java8" , " quickcheck" , " java-core" ]
142+ classDirectories = files(subprojects. findAll {subproject -> subproject. name in projectForFoverage} .sourceSets. main. output)
143+ sourceDirectories = files(subprojects. findAll {subproject -> subproject. name in projectForFoverage} .sourceSets. main. allSource. srcDirs)
144+
149145 reports {
150146 html. enabled = true
151147 xml. enabled = true
152- csv. enabled = false
153148 }
154149}
155150
@@ -210,23 +205,3 @@ configure(subprojects.findAll { it.name != "props-core" }) {
210205task env << {
211206 println System . getenv()
212207}
213-
214- task jacocoRootReport (type : org.gradle.testing.jacoco.tasks.JacocoReport ) {
215- dependsOn = subprojects. jacocoTestReport
216- sourceDirectories = files(subprojects. sourceSets. main. allSource. srcDirs)
217- classDirectories = files(subprojects. sourceSets. main. output)
218- executionData = files(subprojects. jacocoTestReport. executionData)
219- reports {
220- xml. enabled true
221- xml. destination = " ${ buildDir} /reports/jacoco/test/jacocoTestReport.xml"
222- }
223- // We could remove the following setOnlyIf line, but then
224- // jacocoRootReport would silently be SKIPPED if something with
225- // the projectsWithUnitTests is wrong (e.g. a project is missing
226- // in there).
227- setOnlyIf { true }
228- }
229-
230- coveralls {
231- sourceDirs = files(subprojects. sourceSets. main. allSource. srcDirs). files. absolutePath
232- }
0 commit comments