Fork me on GitHub

Release notes for Groovy 2.6

Note
WARNING: Material on this page is still under development! We are currently creating alpha versions of Groovy 2.6 with a goal of gathering feedback on the language changes from our community. In addition, the alpha versions assist other projects and tool vendors within the Groovy ecosystem to begin assessing the impact of moving to/supporting Groovy 2.6. Caution should be exercised if using new features as the details may change before final release.)

Groovy 2.6 is simply a back-port of Groovy 3.0 for JDK7. We encourage all users on JDK8 or above to move directly to Groovy 3.0. Only users that must run on JDK7 need to use 2.6. You should consult the Groovy 3.0 release notes for a list of supported language changes. Only differences with 3.0 due to the different JVM requirements are reported here.

Parrot Parser

Groovy 2.6 defaults to using the old parser but you can enable the Parrot parser which supports additional syntax options and language features.

Enabling the parser

For Groovy 3.0, the new parser is enabled by default. However, for Groovy 2.6, you enable the new parser using a system property. Use -Dgroovy.antlr4=true (set via JAVA_OPTS if needed).

If building from source, you need to provide Gradle with -PuseAntlr4 in order to include the classes which support the new parser.

Differences with Groovy 3.0

TBD

JDK requirements

Groovy 2.6 requires JDK8+ to build and JDK7 is the minimum version of the JRE that we support.

More information

You can browse all the tickets closed for Groovy 2.6 in JIRA.