private void ensureGroovyComparability(final ClassLoader classLoader) throws MojoExecutionException {
    Version groovyVersion = groovyVersionHelper.detectVersion(classLoader);
    if (groovyVersion == null) {
      // complain and continue
      log.error("Unable to determine Groovy version");
    }
    else {
      log.debug("Detected Groovy version: {}", groovyVersion);
      if (versionHelper.before(2).containsVersion(groovyVersion)) {
        throw new MojoExecutionException("Unsupported Groovy version: " + groovyVersion);
      }
    }
  }
private void ensureGroovyComparability ( final ClassLoader classLoader ) throws MojoExecutionException { Version groovyVersion = groovyVersionHelper . detectVersion ( classLoader ) ; if ( groovyVersion == null ) { log . error ( "Unable to determine Groovy version" ) ; } else { log . debug ( "Detected Groovy version: {}" , groovyVersion ) ; if ( versionHelper . before ( 2 ) . containsVersion ( groovyVersion ) ) { throw new MojoExecutionException ( "Unsupported Groovy version: " + groovyVersion ) ; } } }
Ensure Groovy compatibility.  Requires Groovy 2+