From 552d5689a4f4cac3dfbe20e20e17880902e3ad7c Mon Sep 17 00:00:00 2001 From: Victor Melnik Date: Mon, 25 Mar 2019 23:44:08 +0200 Subject: [PATCH] Update build.gradle --- build.gradle | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index dc91b9da..3e25d8a0 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,10 @@ plugins { } def publishedProjects = subprojects.findAll { it.path != ':test' } +def jacocoExclusions = [ + '**/com/annimon/stream/internal/Compat**', + '**/com/annimon/stream/test/hamcrest/CommonMatcher**' +] allprojects { repositories { @@ -35,10 +39,7 @@ subprojects { afterEvaluate { classDirectories = files(classDirectories.files.collect { - fileTree(dir: it, exclude: [ - '**/com/annimon/stream/internal/Compat**', - '**/com/annimon/stream/test/hamcrest/CommonMatcher**' - ]) + fileTree(dir: it, exclude: jacocoExclusions) }) } } @@ -94,6 +95,8 @@ sonarqube { property "sonar.projectName", "Lightweight-Stream-API" property "sonar.projectKey", "lightweight-stream-api" property "sonar.host.url", "https://sonarcloud.io" + property 'sonar.jacoco.reportPath', "stream/build/jacoco/jacocoMerge.exec" + property 'sonar.coverage.exclusions', jacocoExclusions } }