Groovy is an agile dynamic language for the Java Platform that has many of the features that people like so much in languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.
Groovy works cleanly with all existing Java objects and libraries and compiles straight to Java bytecode!
Groovy is ideally designed to reach the following purposes :
- developping in a quick, concise and fun way web applications. The Grails project shows you this evidence.
- bringing the power of a scripting language directly into the Java Platform
- writing test cases for unit tests very easy.
- prototyping and productizing real industrial applications
- writing shell scripts easily
Groovy can be used according your kind of application in two main modes :
- traditionnal byte code compiled applications
- purely interpretated scripts
Groovy is powerful thanks to :
- language conceptual enhancements
- Closure support, ie the ability to define piece of executing code handled like any other object
- native syntax for lists and maps
- builder notion, ie ... TBD
- regex operators
- native beans
- operator overloading to simplify working with datatypes Collections and Maps
- Polymorphic iteration and autoboxing
- extension of java objects api
- providing of standard very useful libraries
- Groovy Markup for XML, DOM, ...
- Groovy Path expression language
- Groovlets for implementing Servlets easily in simple Groovy scripts
- Ant Scripting
- Groovy Categories allow you to add methods to classes with the "use" keyword
- Groovy Template Engines which are pluggable, simple to use, integrate GPath and compile to bytecode
- Groovy SQL for making SQL more Groovy
- providing user great modules
- COM Scripting
Why Grovvy is a good choice for you
You can learn Groovy by following the beginners tutorial.
You may want to read the user guide or browse some of the links on the left of this page.
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!
Read more News on the Groovy Blog