File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed
Expand file tree Collapse file tree 3 files changed +30
-4
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 44[ ![ Build Status] ( https://travis-ci.org/WPIRoboticsProjects/GRIP.svg?branch=master )] ( https://travis-ci.org/WPIRoboticsProjects/GRIP )
55[ ![ Build status] ( https://ci.appveyor.com/api/projects/status/9xl8pggec4l75pqb/branch/master?svg=true )] ( https://ci.appveyor.com/project/ThomasJClark/grip/branch/master )
66[ ![ codecov.io] ( http://codecov.io/github/WPIRoboticsProjects/GRIP/coverage.svg?branch=master )] ( http://codecov.io/github/WPIRoboticsProjects/GRIP?branch=master )
7-
7+ [ ![ Github Releases ] ( https://img.shields.io/github/downloads/WPIRoboticsProjects/GRIP/total.svg )] ( https://github.com/WPIRoboticsProjects/GRIP/releases/latest )
88
99# GRIP Computer Vision Engine
1010
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 {
@@ -31,14 +31,15 @@ allprojects {
3131 testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
3232 }
3333
34- version = ' 0.1 .0'
34+ version = ' 0.2 .0'
3535
3636 jacocoTestReport {
3737 reports {
3838 xml. enabled = true
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