Vita Rara: A Life Uncommon

Get the Running Version of Groovy


Categories: |

This isn't documented in the Javadoc. (There is not javadoc on this method.) It seems to return the running version of Groovy when called:

org.codehaus.groovy.runtime.InvokerHelper.getVersion()

Helpful if you really need to know.

New way to get groovy version

As soon as groovy 1.6.6 and 1.7-rc-1 released, you will be able to get groovy version via documented groovy.lang.GroovySystem#getVersion() - http://bamboo.ci.codehaus.org/download/GROOVY-GROOVY160J14/artifacts/build-353/documentation/api/groovy/lang/GroovySystem.html#getVersion()

A real find...

... but since InvokerHelper is a Groovy internal class being subject to change, you should use it only if you know which version of Groovy is running ... ;-)

--joerg