diff --git a/README.md b/README.md index ad4747c88..fe4382ec0 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,13 @@ Every module contains tests that can be run like gradle test ``` -The following optional properties can be set. +Additional test properties are listed in the module's README. -| Property | Description | -|--------------|---------------------------------------| -| `withJacoco` | Enables Jacoco code coverage analysis | +Activate Jacoco code coverage analysis by +```shell +gradle testCodeCoverageReport +``` +instead of ``gradle test`` ### License report diff --git a/build.gradle b/build.gradle index d966d3baf..1868a6910 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,6 @@ plugins { import com.github.jk1.license.filter.* import com.github.jk1.license.render.* -def jacocoVersion = "0.8.6" - apply plugin: 'io.codearte.nexus-staging' ext { @@ -50,7 +48,7 @@ subprojects { archivesBaseName = "testerra" apply plugin: 'maven-publish' // tasks publish and publishToMavenLocal - apply plugin: 'jacoco' + apply plugin: 'jacoco-report-aggregation' apply plugin: 'signing' apply plugin: 'com.github.jk1.dependency-license-report' @@ -63,10 +61,6 @@ subprojects { mavenCentral() } - jacoco { - toolVersion = jacocoVersion - } - test { ignoreFailures = true @@ -79,12 +73,6 @@ subprojects { systemProperties(System.getProperties()) } - jacoco { - enabled = System.properties.containsKey("withJacoco") - //excludes = ['jdk.internal.*'] - } - } - task cleanDist { doLast { delete "out" @@ -122,30 +110,3 @@ subprojects { // Do not move this integration because `group` and `version` is needed for publishing apply from: rootProject.file('publish.gradle') - -task jacocoAggregateReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { - - additionalSourceDirs(files(subprojects.sourceSets.main.allSource.srcDirs)) - - def srcdirs = files(subprojects.sourceSets.main.allSource.srcDirs) - def classdirs = files(subprojects.sourceSets.main.output) - sourceDirectories.setFrom(srcdirs) - classDirectories.setFrom(classdirs) - - executionData(project.fileTree(dir: '.', include: '**/build/jacoco/test.exec')) - - reports { - html.enabled = true - xml.enabled = true - csv.enabled = false - } - onlyIf = { - true - } - - doFirst { - executionData(files(executionData.findAll { - it.exists() - })) - } -}