From eda0dc0eb0f0bb760f6b2807e2228604e2357df2 Mon Sep 17 00:00:00 2001 From: Andras Katona <41361962+akatona84@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:51:31 +0100 Subject: [PATCH] MINOR: Preventing running the :core tests twice when testing with coverage (#15580) reportScoverage task (which was used previously as dependency of the registered coverage task) creates a task for each Test task and executes them. There's unitTest, integrationTest and the test tasks (which is just for executing both unit and integration), so reportScoverage executes all three with their corresponding scoverage task, hence running all tests twice. Solution is just to use the reportTestScoverage task as dependency. Reviewers: Viktor Somogyi-Vass --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 88d919b27c6..489473c885a 100644 --- a/build.gradle +++ b/build.gradle @@ -748,7 +748,7 @@ subprojects { } if (userEnableTestCoverage) { - def coverageGen = it.path == ':core' ? 'reportScoverage' : 'jacocoTestReport' + def coverageGen = it.path == ':core' ? 'reportTestScoverage' : 'jacocoTestReport' tasks.register('reportCoverage').configure { dependsOn(coverageGen) } }