Skip to content

Commit

Permalink
Check Spock2 presence on the module path only for Gradle 6.4+
Browse files Browse the repository at this point in the history
Signed-off-by: Pavlo Shevchenko <[email protected]>
  • Loading branch information
pshevche committed Jul 18, 2023
1 parent 414d60a commit 47ce6f1
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 47ce6f1

Please sign in to comment.