Detecting groovy version

Determine the groovy version in a script.

import org.codehaus.groovy.runtime.InvokerHelper

println InvokerHelper.version