public boolean isJava18() {
    return "18".equals(javaSpecVersion);
  }
Tells whether the Java version is 18.

@since 2.0
@return whether the Java version is 18
spock-core/src/main/java/spock/util/environment/Jvm.java