I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 19016edc authored by str4d's avatar str4d
Browse files

Gradle: Add code coverage reporting, upload from Travis CI to Codecov

parent 75e6539f
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,13 @@ cache: ...@@ -22,6 +22,13 @@ cache:
- $HOME/.gradle/caches/ - $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/ - $HOME/.gradle/wrapper/
script:
- ./gradlew check
- ./gradlew codeCoverageReport
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications: notifications:
irc: irc:
channels: channels:
......
// Exclude apps/ dir itself, but include its subdirs // Exclude apps/ dir itself, but include its subdirs
configure(subprojects - project(':apps')) { def javaProjects = subprojects - project(':apps')
configure(javaProjects) {
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'idea' apply plugin: 'idea'
...@@ -29,4 +32,25 @@ configure(subprojects - project(':apps')) { ...@@ -29,4 +32,25 @@ configure(subprojects - project(':apps')) {
} }
} }
task codeCoverageReport(type: JacocoReport) {
dependsOn(javaProjects.test)
jacocoClasspath = project(':core').configurations.jacocoAnt
additionalSourceDirs = files(javaProjects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(javaProjects.sourceSets.main.allSource.srcDirs)
classDirectories = files(javaProjects.sourceSets.main.output)
executionData = files(javaProjects.jacocoTestReport.executionData)
doFirst {
executionData = files(executionData.findAll { it.exists() })
}
reports {
xml.enabled true
xml.destination "${buildDir}/reports/jacoco/report.xml"
html.enabled true
html.destination "${buildDir}/reports/jacoco/html"
}
}
//apply from: file('gradle/update.gradle') //apply from: file('gradle/update.gradle')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment