From ae4ec01bca9e618ce0b54485100a18b6418e9f1d Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Mon, 19 Jul 2021 20:14:41 +0200 Subject: [PATCH] Test: Don't set --module-path when not supported --- core/build.gradle.kts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 03899972..9390b19e 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -38,9 +38,10 @@ dependencies { } fun JavaForkOptions.patchTestExecParams() { + if (!JavaVersion.current().isJava9Compatible || props.bool("skipModuleInfo")) return val patchFiles = sourceSets.test.get().output.classesDirs + - sourceSets.test.get().resources.sourceDirectories + - sourceSets.main.get().resources.sourceDirectories + sourceSets.test.get().resources.sourceDirectories + + sourceSets.main.get().resources.sourceDirectories val resourceDir = sourceSets.test.get().resources.sourceDirectories.singleFile val testPackages = sourceSets.test.get().resources.asSequence().map { it.parentFile }.toSet().asSequence().map { it.relativeTo(resourceDir).toPath().joinToString(separator = ".")