File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,15 @@ addons:
1919before_install :
2020 - export DISPLAY=:99.0
2121 - sh -e /etc/init.d/xvfb start
22+ - pip install --user codecov
2223
2324install : ./gradlew :ui:assemble --stacktrace
2425
2526after_failure : # Run again with debug info enabled
2627 - ./gradlew check --stacktrace -PprintTestResults
2728
2829after_success :
29- - bash <(curl -s https:// codecov.io/bash) # Code Coverage Reporting
30+ - codecov
3031 - ./gradlew aggregateJavadocs
3132 - .travis-scripts/push-javadoc-to-gh-pages.sh
3233 - .travis-scripts/before-deploy.sh
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ plugins {
1515}
1616apply plugin : ' nebula-aggregate-javadocs'
1717
18-
1918allprojects {
2019 apply plugin : ' java'
2120 apply plugin : ' application'
21+ apply plugin : ' jacoco'
2222
2323
2424 repositories {
@@ -39,6 +39,7 @@ allprojects {
3939 html. enabled = true
4040 }
4141 }
42+
4243 check. dependsOn jacocoTestReport
4344
4445 tasks. withType(Javadoc ) {
@@ -170,6 +171,30 @@ project(":ui") {
170171 mainClassName = javafx. mainClass
171172}
172173
174+ /*
175+ * This is roughly based upon this post:
176+ * https://discuss.gradle.org/t/merge-jacoco-coverage-reports-for-multiproject-setups/12100/6
177+ */
178+ task jacocoRootReport (type : JacocoReport , group : ' Coverage reports' ) {
179+ description = ' Generates an aggregate report from all subprojects'
180+ dependsOn(subprojects. test)
181+
182+ additionalSourceDirs = files(subprojects. sourceSets. main. allSource. srcDirs)
183+ sourceDirectories = files(subprojects. sourceSets. main. allSource. srcDirs)
184+ classDirectories = files(subprojects. sourceSets. main. output)
185+ executionData = files(subprojects. jacocoTestReport. executionData)
186+
187+ reports {
188+ html. enabled = true
189+ xml. enabled = true
190+ }
191+
192+ doFirst {
193+ executionData = files(executionData. findAll { it. exists() })
194+ }
195+ }
196+ check. dependsOn jacocoRootReport
197+
173198task wrapper (type : Wrapper ) {
174199 gradleVersion = ' 2.9'
175200}
You can’t perform that action at this time.
0 commit comments