@Internal
  public static boolean isGroovy2() {
    return GroovySystem.getVersion().startsWith("2.");
  }
Note: This method may throw checked exceptions although it doesn't say so.
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java