The latest Groovy Weekly column is out, in its 8th edition:
The 6th edition of the Groovy Weekly column is out!
Get the latest news of the Groovy ecosystem.
The Groovy Weekly 5th edition is out!
The big news of this edition is probably the ongoing success of Groovy, demonstrated by the tremendous growth in downloads for Groovy, from 1.7 million downloads in 2012 up to 3 million in 2013!
The "Groovy Weekly" column has launched!
On a weekly basis, you'll be able to get all the latest news, filtered and categorized, about the Groovy ecosystem, with information such as the latest releases, upcoming events, news about various projects of the Groovy world, job postings, interesting tweets or mailing-list posts, and more. If you want to get up-to-date on everything Groovy, that's what you'll have to read!
The first two editions have been published here:
Note that going forward, as we're working on a redesigned Groovy website, the blog posts will likely migrate to the future Groovy blog instead.
The release of the column should take place every week, and will be announced via different means: mailing-list, tweeter, Google+, and on this blog. But if you prefer to receive this information directly in your inbox, you can subscribe to the Groovy Weekly newsletter.
Also, this column is yours! If you want to contribute news items, don't hesitate to do so via the contribution form.
We're looking forward to hearing about your feedback about this weekly column!
And on behalf of the Groovy team, we'd like to wish you a very Groovy New Year!
Hot on the heels of the release of our new major release of Groovy 2.2.0, we're delivering a first bug fix release with Groovy 2.2.1.
As a refresher, be sure to have a look at the release notes for Groovy 2.2.0 to remember the various improvements and enhancements that got integrated.
Some fixes didn't make it in the RC phase, and additional further fixes appeared upon wider usage of 2.2.0 in the wild. Those fixes cover various areas, such as issues with Groovysh, a couple VerifyErrors, some fixes to our AST transformations, a problem with the new implicit closure coercion mechanism. For more details, you can have a look at the full JIRA release notes.
And go download Groovy 2.2.1!
Thanks a lot for your attention and your contributions.
This is with great pleasure that the Groovy team is announcing today the release of Groovy 2.2, the latest version of the Groovy programming language.
Groovy 2.2 features:
- Implicit closure coercion
- @Memoized AST transformation for methods
- Define base script classes with an annotation
- New DelegatingScript base class for scripts
- New @Log variant for the Log4j2 logging framework
- @DelegatesTo with generics type tokens
- Precompiled type checking extensions
- Groovysh enhancements
- Bintray's JCenter repository
- OSGi manifests for the “invoke dynamic” JARs
- And other minor bug fixes, enhancements and performance improvements
Then download Groovy 2.2 while it's hot!
Thanks a lot to all the users, contributors, developers who contributed to that release!
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 abstract class, but it's possible to set up our own base script class extending Script through CompilerConfiguration. A new AST transformation is introduced in Groovy 2.2 which allows you to define the base script class as follows:
Again for 2.2, a new @Log variant has been added to support Log4j2, with the @Log4j2 AST transformation:
For more details on those two releases, please have a look at the release notes on JIRA:
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!
The Groovy team is happy to announce the releases of the second beta of Groovy 2.2, along with a bug fix release of Groovy 2.1.7.
We're close to moving towards RC mode for the upcoming Groovy 2.2 release, and we'd be happy to hear about your feedback about this new version when used in your projects. Please have a moment to test it against your code, and tell us if you notice any problem or regression.
Groovy 2.2.0-beta-2 is pretty much feature complete by now, with only a few minor improvements, and both 2.2.0-beta-2 and 2.1.7 contain a great deal of bug fixes around our static type checker and compilation support.
You can have a look at the JIRA release notes for the details:
Those two Groovy versions are available in the download area of the website.
Thanks a lot to all those who contributed to this release, and we're looking forward to hearing your feedback about the upcoming 2.2!
We'd also be happy to see you at next week's SpringOne2GX conference if you're around! So don't hesitate to come and say hi to the Groovy team members who will be present — and there are quite a few of us there!
The Groovy development team is pleased to announce the release of the first beta of Groovy 2.2, along with a bug fix release of Groovy 2.1.6.
Both Groovy 2.1.6 and 2.2.0-beta-1 contain fixes for the recently discovered JavaDoc vulnerability, that also affected GroovyDoc.
Let me highlight a few interesting points in this 2.2 beta.
Implicit closure coercion
Java 8 will feature lambdas, which are similar to Groovy’s closures. One particular aspect which is interesting with lambdas is how they are converted transparently by Java to interface types that contain one single abstract method. With Groovy closures, except for a few cases, we have to explicitly use the as operator to do the coercion. In Groovy 2.2, we are allowing the same transparent closure coercion to happen, but without the explicit as type coercion, and furthermore, we make it possible to work as well with abstract classes as well.
Notice how the closure is coerced into a Predicate instance. Without that new capabilities, we would have had to write the following instead:
That way, Groovy closure coercion to SAM types is as concise as Java 8 lambda closure convertion.
@Memoized AST transformation for methods
Similarly to our Closure memoization capability, you can now annotate your methods with the new @Memoized annotation. It will use the same underlying cache solution used for closures, and will cache the result of previous executions of the annotated method with the same entry parameters.
New DelegatingScript base class for scripts
With the CompilerConfiguration class that you pass to GroovyShell (as well as GroovyClassLoader and others), you can define a base script class for the scripts that will be compiled with that shell. It’s handy to share common methods to all scripts.
For DSL purposes, it’s interesting to actually delegate the method calls and unbound variable assignments to a different object than the script itself, thanks to the new DelegatingScript.
To make it more concrete, let’s have a look at the following configuration script:
@DelegatesTo with generics type tokens
The @DelegatesTo annotation, introduced in Groovy 2.1 that helps the type checker, IDEs, tools, to provide better support for DSLs using closure delegation strategies, works with generics token types as well. You can tell Groovy that the delegatee is of the type of the generics component:
Note the genericTypeIndex attribute of @DelegatesTo that points at the index of the generic component. Unfortunately, as the generic placeholders are not kept at the bytecode level, it’s impossible to just reference T, and we had to use an index to point at the right type.
Precompiled type checking extensions
The static type checking extensions introduced in Groovy 2.1 were working solely with non-compiled scripts. But with this beta, you can also specify a fully-qualified name of the precompiled class implementing your extension:
Groovysh has been expanded with various enhancements:
support for code completion in various places, like imports, package names, class names, variable names, parameter names, keywords, etc.
a doc command allows you to open the relevant JavaDoc and Groovy GDK web pages to have more information for a given class, for example try in Groovysh:
you can complete file names inside strings, particularly handy for your scripting tasks where you want to open a file with new File("data.|”) (where the pipe character is the position of your cursor), and then hit the TAB key to have the completion of the file name
OSGi manifests for the “invoke dynamic” JARs
If you’re using Groovy in the context of an OSGi container, the Groovy JARs contained the right OSGi metadata information in its manifest. However, it wasn’t the case for the “invoke dynamic” JARs, as the underlying library used by the Gradle OSGi plugin wasn’t supporting JDK 7 bytecode. Fortunately, this deficiency has been fixed, the Gradle OSGi plugin updated, and we’re now able to have our “indy” JARs work fine under OSGi has well.
Those changes have not yet been backported to the Groovy 2.1.x branch, but will likely be. We’re looking forward to hearing your feedback, for those using Groovy and OSGi.
For more details about the various bug fixed in those releases, please have a look at the JIRA release notes:
And then, go download Groovy 2.2-beta-1 and Groovy 2.1.6 on our Download area while it's hot!
Thanks a lot for all your contributions, and we’re looking forward to your feedback on those releases.
I'm pleased to announce the release of Groovy 2.1.5.
Groovy 2.1.5 is a bug fix release of the Groovy 2.1 branch. In particular, it fixes a problem we've encountered with Groovy 2.1.4 where the extension module descriptors were not found in the "all" JAR, which meant that the usual nice GDK methods extensions for XML and other modules were not found by Groovy.
Thanks to all who contributed to this release!
Keep on groovy'ing!
The Groovy development team is pleased to announce the release of Groovy 2.1.4.
Groovy 2.1.4 is essentially a bug fix release of our 2.1 branch, and you can dive into the details in our JIRA release notes.
You can get the distribution in our download area.
Thanks a lot to all those who contributed to this release, and we're looking forward to hearing your feedback!