About Groovy Binary Compatibility

Important information about Groovy binary compatibility

Excerpted from “Making Java Groovy” book.

How projects in the Groovy ecosystem include Groovy

One of the dirty little secrets of Groovy is that the major versions are not always binary compatible. Code compiled with one version doesn’t necessarily work with any other.

This means that projects in the Groovy ecosystem have a choice. They can either be compiled with different versions of Groovy and make the Groovy version number part
of their own version, or they can bundle in a particular version of Groovy.

The Spock framework (discussed in chapter 6) takes the former approach. Spock versions are in the form 0.7-groovy-2.0, meaning Spock version 0.7 compiled with Groovy version 2.0.

The Grails and Gradle projects take the other approach. Grails 1.3.9, for example, includes a copy of Groovy 1.7.8, Grails 2.0.3 includes Groovy 1.8.6, and Grails 2.2.1
includes Groovy 2.0.8. To see the Groovy version included in your Gradle distribution, run the gradle –v command.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s