Gradle 1.7 released

(Hans Dockter) #1

The Gradle team is excited to announce the release of Gradle 1.7, now available for download.

The release notes contain detailed information about what’s new and improved in this release.

As always, please share your experiences with Gradle 1.7 via the Gradle Forums.

What’s New in Gradle 1.7?

The big story for Gradle 1.7 is build performance. Gradle 1.7 is the fastest Gradle yet, with major optimizations to dependency management and general initialization mechanisms that affect all builds.

There are also many great new features such as:

  • Significantly improved C++ support * Task finalizers * Templated project creation * Powerful duplicate file handling strategies for copy and archive operations

This release also sees 37 raised issues resolved.

Gradle 1.7 is Even Faster

Gradle understands that your time is valuable and the last thing you want to be doing is waiting around for a build. This is why the team is focused on squeezing every last bit of performance out of Gradle.

We’ve managed to speed up build script compilation by 75% and there are a number of improvements to parallel execution mode and test execution performance. New in-memory caching in 1.7 has also improved performance of large, benchmark builds by up to 30%. The performance work is going to continue for 1.8.

Innovating DAG based programming

Gradle 1.7 introduces a new task ordering rule that allows a task to finalize some other task. This is an exciting feature that was contributed by Marcin Erdmann. Finalizer tasks can be used to clean up resources, produce reports, or perform any other mandatory function after a task executes regardless of whether it succeeds or fails. They provide a very elegant and efficient solution to many common automation problems.

Create a New Gradle Project

Creating a new Gradle project is easy in Gradle 1.7 - just run the ‘build-setup’ plugin. To create a new project, with a simple build file, some example classes and a unit test, run:

gradle setupBuild --type java-library

The ‘build-setup’ plugin is still incubating, but you can start using it now. For more information, see the Build Setup plugin chapter. This feature will evolve in a rich and fully extendable template system.

Gradle’s C++ Improved

While Gradle’s C++ support is still incubating, there’s a flurry of activity surround support for native builds and the feature is ready to use. Support for various toolchains including GCC and Visual C++ and Cygwin support means that you can use the tools you are comfortable with to build native applications and libraries.

The ability to create and link to static libraries, a declarative approach to binary build variants, and variant-aware dependency resolution mean that Gradle is able to model complex native builds with a simple syntax. Did we mention the improvements to increment build support? Download Gradle 1.7 and take the C++ support for a test drive, we’d appreciate your feedback.

Need Dependencies? Use JCenter

In Gradle 1.7 it is now trivial to reference dependencies from Bintray’s JCenter Repository. Here’s the syntax:

repositories {



If you haven’t heard of Bintray yet, it is a social service for developers to publish, download, store, promote, and share open source software packages. Check it out..

The Wrapper is Hands Off

With Gradle 1.7 you can configure the Gradle Wrapper without adding an extra task to your build script. Just run ‘gradle wrapper’ and everything will be configured. For more information about changes to the Gradle Wrapper, read the Wrapper documentation.

Community Contributions

Every Gradle release more community contributions than the last, and this release was no exception, ranging from documentation improvements to significant new features. The Gradle team would like to thank Marcin Erdmann, Dan Stein, Olaf Klischat, Kyle Mahan, Robert Kuhne, Bjorn Kautler, Seth Goings, Scott Bennett-McLeish, Wujek Srujek, Guillaume Laforge, and Yoav Landman for contributing to this release. For a full listing of community contributions to this release, read the full release notes.

On behalf of the Gradle community, the Gradle development team would like to thank all who have contributed to Gradle. All contributions help make Gradle better for everyone.

The development team is always willing to work with contributors. If you’d like to get involved and contribute to Gradle, is the place to go to get started.

… and more

Gradle 1.7 is one of the busiest releases we’ve made in the last year. Here are other improvements you’ll get when you upgrade to Gradle 1.7.

  • Pattern-based file copy configuration makes it easy to configure behavior on files matching Ant patterns. * Duplicate file handling strategies handle situations that involve duplicate files being copied to the same directory or archive. * TestNG parameters are now included in test reports, and the Test task is easier to control with the Reporting interface. * Test reports now appear in the Build Dashboard. “What’s the Build Dashboard?”, you ask. Click here to read about the (still incubating) Build Dashboard. * JVM Arguments can now be specified for the Application plugin. * OSGi support has been improved with an update tot he Bnd library. * Strings are now coerced to Enum values in the Gradle DSL. * 37 bug fixes

For more information on which bugs were fixed and for more informaiton about each of these changes, read the 1.7 release notes.

New Books

Tim Berglund, author of Building and Testing with Gradle and Gradle trainer, has released a new Gradle book published by O’Reilly Media: Gradle Beyond the Basics.

This book builds upon the first, delving deeper into aspects relevant to build engineers and developers wanting to get more out of Gradle, such as dependency management and working with the filesystem. It features Tim’s elegant and illuminating writing style along with many practical code samples.

Gradle in Action, written by Benjamin Muschko and published by Manning Publications Co., is available via Manning’s “early access programâ€.

New chapters are appearing regularly. This book is shaping up to be an extremely valuable resource for all Gradle users.

Benjamin Muschko joins Gradleware

Benjamin is a long time Gradle user and valuable contributor to the ecosystem via his many plugins (gradle-tomcat-plugin, gradle-clover-plugin, gradle-gae-plugin to name just a few) and of course the Gradle in Action book which is currently in development.

We are very glad to have Benjamin on board, helping to continue to make Gradle the best build tool in the industry.

Get Trained by a Gradle Expert

Don’t miss our in-depth 3-day build-master classes delivered by one of the Gradle Core developers. We have upcoming classes in London and San Francisco, CA.