2017-03-21 11:58:19 -07:00
|
|
|
apply plugin: 'com.github.kt3k.coveralls'
|
|
|
|
apply plugin: 'com.palantir.jacoco-full-report'
|
|
|
|
apply plugin: 'jacoco'
|
|
|
|
|
|
|
|
// Must match the version used in jacoco4sbt plugin.
|
|
|
|
ext.jacocoVersion = '0.7.1.201405082137'
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = jacocoVersion
|
|
|
|
}
|
|
|
|
|
|
|
|
jacocoFull {
|
2017-05-03 12:56:02 -07:00
|
|
|
excludeProject ":wherehows-backend", ":wherehows-hadoop", ':wherehows-data-model', ':wherehows-etl', ':wherehows-common'
|
2017-03-21 11:58:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Add the jacoco plugin to each project
|
|
|
|
subprojects {
|
|
|
|
plugins.apply('java')
|
|
|
|
plugins.apply('jacoco')
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = jacocoVersion
|
|
|
|
}
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
reports {
|
|
|
|
xml.enabled true
|
|
|
|
html.enabled true
|
|
|
|
csv.enabled false
|
|
|
|
}
|
|
|
|
}
|
2017-03-21 17:06:13 -07:00
|
|
|
|
|
|
|
plugins.withType(PlayPlugin).whenPluginAdded {
|
|
|
|
jacocoTestReport {
|
|
|
|
executionData = files("${buildDir}/jacoco/testPlayBinary.exec")
|
|
|
|
sourceDirectories = files("app")
|
|
|
|
classDirectories = files("${buildDir}/playBinary/classes")
|
|
|
|
}
|
|
|
|
}
|
2017-03-21 11:58:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Configure the coveralls task to read the aggregated JaCoCo report
|
|
|
|
coveralls {
|
|
|
|
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoFullReport/jacocoFullReport.xml"
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.coveralls {
|
|
|
|
doFirst {
|
|
|
|
// Must set this at task execution time for the play.gradle's sourceSets modification to take effect.
|
|
|
|
coveralls.sourceDirs = subprojects.sourceSets.main.java.srcDirs.flatten()
|
|
|
|
}
|
|
|
|
}
|