@@ -19,15 +19,14 @@ buildscript {
1919 dependencies {
2020 classpath " com.ofg:uptodate-gradle-plugin:$uptodateVersion "
2121 classpath " me.tatarka:gradle-retrolambda:$retrolambdaVersion "
22- classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0 '
22+ classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3 '
2323 }
2424}
2525
2626
2727apply plugin : " jacoco"
2828apply plugin : ' com.github.kt3k.coveralls'
2929
30-
3130if (JavaVersion . current(). isJava8Compatible()) {
3231 allprojects {
3332 tasks. withType(Javadoc ) {
@@ -100,14 +99,9 @@ subprojects {
10099 repositories {
101100 mavenCentral()
102101 }
103-
104- dependencies {
105- classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
106- }
107102 }
108103
109104 apply plugin : " jacoco"
110- apply plugin : ' com.github.kt3k.coveralls'
111105
112106 apply from : " $rootDir /lib.gradle"
113107 apply plugin : " java"
@@ -214,3 +208,23 @@ configure(subprojects.findAll { it.name != "props-core" }) {
214208task env << {
215209 println System . getenv()
216210}
211+
212+ task jacocoRootReport (type : org.gradle.testing.jacoco.tasks.JacocoReport ) {
213+ dependsOn = subprojects. jacocoTestReport
214+ sourceDirectories = files(subprojects. sourceSets. main. allSource. srcDirs)
215+ classDirectories = files(subprojects. sourceSets. main. output)
216+ executionData = files(subprojects. jacocoTestReport. executionData)
217+ reports {
218+ xml. enabled true
219+ xml. destination = " ${ buildDir} /reports/jacoco/test/jacocoTestReport.xml"
220+ }
221+ // We could remove the following setOnlyIf line, but then
222+ // jacocoRootReport would silently be SKIPPED if something with
223+ // the projectsWithUnitTests is wrong (e.g. a project is missing
224+ // in there).
225+ setOnlyIf { true }
226+ }
227+
228+ coveralls {
229+ sourceDirs = files(subprojects. sourceSets. main. allSource. srcDirs). files. absolutePath
230+ }
0 commit comments