Skip to content

Commit

Permalink
Merge pull request #203 from gradle/pshevche/older_gradle_no_module_path
Browse files Browse the repository at this point in the history
Check for Spock 2 JAR on module path only for Gradle 6.4+
  • Loading branch information
pshevche committed Jul 19, 2023
2 parents 108e6f0 + 47ce6f1 commit 38b23b9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends File> path) {
Expand Down

0 comments on commit 38b23b9

Please sign in to comment.