Added multimodule codecov configuration
@@ -94,3 +94,27 @@ apply from: "$rootDir/gradle/documentation.gradle"
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
+
+task codeCoverageReport(type: JacocoReport) {
+
+ // Gather execution data from all subprojects
+ // (change this if you e.g. want to calculate unit test/integration test coverage separately)
+ executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
+
+ // Add all relevant sourcesets from the subprojects
+ subprojects
+ .dropWhile { springfox.gradlebuild.utils.ProjectDefinitions.publishable(it) }
+ .each { sourceSets it.sourceSets.main }
+
+ reports {
+ xml.enabled true
+ html.enabled true
+ html.destination "${buildDir}/reports/jacoco"
+ csv.enabled false
+ }
+}
+
+// always run the tests before generating the report
+codeCoverageReport.dependsOn {
+ subprojects*.test
+}
\ No newline at end of file
