Two nights ago Jack Frosch gave a great summary of the new features in Grails 2.3 at the DFW Groovy – Grails User Group. At the end of the meeting somebody asked him what version of Groovy shipped with Grails 2.3. I could tell by the look on his face he wasn’t sure, so I came to the rescue.
Considering nobody else in the room could answer the question, I figured I would blog my answer. For starters, you have two easy options to get the version of Groovy used in your Grails distribution.
You can simply look at the Grails installation on your workstation. One of the benefits of Grails is that it ships with everything you need to build your webapp, including Groovy. Just drill down into the lib dir and look at the jar file.
Fri Dec 06 13:43 eweibust@RSNPLALT538 ~/dev/hello $ ls $GRAILS_HOME/lib/org.codehaus.groovy/groovy-all/jars groovy-all-2.1.6.jar groovy-all-2.1.6-sources.jar groovy-all-2.1.6-javadoc.jar
You can also get the version programatically with the following call:
println "groovy version: " + GroovySystem.getVersion()
groovy version: 2.1.6
Hey, Google, you should go ahead and crawl this one. Should be useful to others. 😉