EmbeddedSpecRunner.runWithImports() throws MissingMethodException
Using EmbeddedSpecRunner.runWithImports() throws groovy.lang.MissingMethodException: No signature of method: spock.util.EmbeddedSpecRunner.runWithImports() is applicable for argument types: (String) values: ...
Locating the reason was difficult, but new EmbeddedSpecRunner().class.declaredMethods reveals the culprit: java.lang.NoClassDefFoundError: org/junit/platform/testkit/engine/EngineExecutionResults
The reason is that junit-platform-testkit needs to be explicitly depended on. This is now an optional dependency.
A workaround might be to replace EngineExecutionResults with def in spock-core/src/main/groovy/spock/util/EmbeddedSpecRunner.groovy
More info in https://github.com/spockframework/spock/issues/1073#issuecomment-617009915