diff --git a/plugin/src/main/java/org/gradle/testretry/internal/executer/framework/TestFrameworkStrategy.java b/plugin/src/main/java/org/gradle/testretry/internal/executer/framework/TestFrameworkStrategy.java index 823008de..9ea69464 100644 --- a/plugin/src/main/java/org/gradle/testretry/internal/executer/framework/TestFrameworkStrategy.java +++ b/plugin/src/main/java/org/gradle/testretry/internal/executer/framework/TestFrameworkStrategy.java @@ -52,7 +52,11 @@ static TestFrameworkStrategy of(JvmTestExecutionSpec spec) { } static boolean isSpock2Used(JvmTestExecutionSpec spec) { - return isSpock2JarOnPath(spec.getClasspath()) || isSpock2JarOnPath(spec.getModulePath()); + return isSpock2JarOnPath(spec.getClasspath()) || supportsJavaModules() && isSpock2JarOnPath(spec.getModulePath()); + } + + static boolean supportsJavaModules() { + return gradleVersionIsAtLeast("6.4"); } static boolean isSpock2JarOnPath(Iterable path) {