From d8319bb35c1b4284ebb6192553e427e1c11f4951 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Fri, 20 Aug 2021 22:13:21 +0100 Subject: [PATCH] Fix coverage not being generated for in-game tests --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4f578960a..5df4e44ba 100644 --- a/build.gradle +++ b/build.gradle @@ -363,7 +363,7 @@ task setupServer(type: Copy) { into "test-files/server" } -["Client", "Server"].forEach {name -> +["Client", "Server"].forEach { name -> tasks.register("test$name", JavaExec.class).configure { it.group('In-game tests') it.description("Runs tests on a temporary Minecraft instance.") @@ -400,7 +400,7 @@ task setupServer(type: Copy) { it.executionData(new File(buildDir, "jacoco/test${name}.exec")) it.sourceDirectories.from(sourceSets.main.allJava.srcDirs) - it.classDirectories.from(new File(buildDir, "jacocoClassDump/$name")) + it.classDirectories.from(new File(buildDir, "jacocoClassDump/test$name")) it.reports { xml.enabled true