Discussion:
[ANN] Release candidate of Groovy 2.2
Guillaume Laforge
2013-10-14 15:49:15 UTC
Permalink
Hi all,

The Groovy team is happy to announce the release of the *release candidate
of Groovy 2.2*, as well as a *bug-fix release for Groovy 2.1.8*.

As you can guess with this release candidate, the final version of Groovy
2.2 is fast approaching, and we'd be happy to get as much feedback on this
release as possible, to squash potential bugs before the general
availability of 2.2. So *please be sure to test your applications with this
release candidate*.

For both releases, we've made a small update to the default Grab
configuration which is to use Bintray's JCenter repository as the first in
the chain of resolvers, as Bintray's JCenter repository is noticeably
faster and more responsive than Maven Central, offers dependencies always
with their checksums, and stores and caches dependencies it wouldn't have
for faster delivery the next time a dependency is required. This should
make your scripts relying on @Grab faster when downloading dependencies for
the first time.

An interesting feature in the release candidate only is the ability for
scripts to define their base script class. All scripts usually extend the
groovy.lang.Script
<http://groovy.codehaus.org/api/groovy/lang/Script.html> abstract
class, but it's possible to set up our own base script class extending
Script through CompilerConfiguration<http://groovy.codehaus.org/api/org/codehaus/groovy/control/CompilerConfiguration.html>.
A new AST transformation is introduced in Groovy 2.2 which allows you to
define the base script class as follows:
import groovy.transform.BaseScript

abstract class DeclaredBaseScript extends Script {
int meaningOfLife = 42
}

@BaseScript DeclaredBaseScript baseScript

assert meaningOfLife == 42

Again for 2.2, a new @Log variant has been added to support Log4j2, with
the @Log4j2 AST transformation:
import groovy.util.logging.Log4j2

@Log4j2
class MyClass {
void doSomething() {
log.info "did something groovy today!"
}
}



For more details on those two releases, please have a look at the release
notes on JIRA:

- Groovy 2.1.8 JIRA release
notes<http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=19570>
- Groovy 2.2.0-rc-1 JIRA release
notes<http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=19569>

Go *download Groovy 2.1.8 and test drive 2.2.0-rc-1* while they're hot, in
the download area <http://groovy.codehaus.org/Download?nc>!

Thanks a lot for your contributions to those releases, in terms of bug
reports, discussions on the mailing-lists, code contributions and pull
requests!

Keep on groovy'ing!
--
Guillaume Laforge
Groovy Project Manager
Pivotal, Inc.

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> /
Google+<https://plus.google.com/u/0/114130972232398734985/posts>
Loading...