From d641292fca57d476dfd4e751ce2f6a5aa32284eb Mon Sep 17 00:00:00 2001 From: Thijs Koppen Date: Fri, 17 Nov 2023 18:17:03 +0100 Subject: [PATCH] Include library source set in examples coverage report --- build.gradle.kts | 15 --------------- examples/build.gradle.kts | 4 ++++ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 621d6ac..9fe820b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,8 +17,6 @@ plugins { kotlin("jvm") jacoco - `jvm-test-suite` - `jacoco-report-aggregation` id("org.sonarqube") } @@ -66,19 +64,6 @@ configure(subprojects) { } } -tasks.testCodeCoverageReport { - dependsOn(project(":library").tasks.jacocoTestReport) - dependsOn(project(":examples").tasks.jacocoTestReport) - finalizedBy(tasks.jacocoTestCoverageVerification) - - reports { - xml.required = true - } -} -tasks.test { - finalizedBy(tasks.testCodeCoverageReport) -} - project.afterEvaluate { getTasksByName("quarkusGenerateCode", true).forEach { task -> task.setDependsOn(task.dependsOn.filterIsInstance>() diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 0823716..42d78de 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -34,3 +34,7 @@ allOpen { ksp { arg("addGeneratedAnnotation", "true") } + +tasks.jacocoTestReport { + sourceSets(project(":library").sourceSets.getByName("main")) +}