We’re excited to announce the release of Gradle 1.6. Gradle 1.6 is ready for download. Have a look at the full release notes for Gradle 1.6, and, as always, please share your feedback and experiences with Gradle 1.6 via the Gradle Forums.
What’s New in Gradle 1.6?
Code Coverage is Now a Core Plugin: JaCoCo Gradle now ships with a JaCoCo plugin to generate code coverage reports. JaCoCo is the only open source code coverage library for Java which is actively maintained.
A Migration Tool for Maven to Gradle Conversion As part of the new Build Setup Plugin, we are releasing the initial version of our Maven to Gradle conversion tool. With the Gradle 1.6 release you can now convert an existing Maven project to Gradle. We’ve had growing interest from Maven users who are interested in switching over and we’ve been focused on reducing the effort required to make this migration.
We’ve tested this migration tool with a number of Maven builds and we can handle most situations. Obviously we won’t be able to migrate your own custom Maven plugins over to a comparable Gradle build, and there are going to be edge cases with difficult and complex Maven builds. Our team is continuously improving this Maven to Gradle conversion feature and we encourage you to try it in the Gradle 1.6 release.
A New Approach to Controlling Execution Order In 1.6 we have added the first of a series of features to make modelling of task dependency and task execution ordering richer. You can now control task order by forcing a task to run after another task, without adding a dependency between the tasks by creating a ‘mustRunAfter’ relation. When both tasks are executed, Gradle will enforce this build order, but because mustRunAfter isn’t a dependency we don’t force you to run both tasks.
Incremental Tasks One of Gradle’s most prized features is its ability to build a project incrementally. If tasks declare their inputs and outputs, Gradle can optimize the build by skipping the execution of each task whose inputs and outputs are unchanged since the previous execution (because the work would be completely redundant). This is known as “Incremental Build”, and our efficient approach to incremental builds means that developers have quicker, more efficient development cycles.
Gradle 1.6 introduces a related, incubating, feature that takes build optimization to the next level: Incremental Tasks. Incremental Tasks is an abstract mechanism allowing plugin developers to create a rich set of incremental tasks. When you write an incremental tasks you can selectively process inputs that have changed, avoiding processing inputs that have not changed giving you the opportunity to avoid unnecessary reprocessing. Gradle provides information about changes to inputs to the task implementation for this purpose.
Community Contributions This release is another release with great community contributions. Some very useful new features such as the “must run after” and “code coverage” plugins, to name a few, came by way of contribution. If you’d like to get involved and contribute to Gradle, a great place to start is gradle.org/contribute.
Register for Gradle Summit 2013, June 13th
The Gradle team is also excited to announce the first ever “Gradle Summit” (Sponsored by Gradleware), held June 13th - 14th in Santa Clara, California. Join us for two fully-packed days of technical sessions from Gradle core developers. We’ve planned a range of session from introductory level sessions on Gradle to advanced, deep dives into Gradle internals. You will also have the opportunity to see how Gradle is used at several large companies. There will be plenty of opportunities to meet fellow Gradle users and interact with the Gradle development team.
Gradle 1.7 release outlook We are still working on the full plan for 1.7 and will publish it a little bit later this time. Work on a new, generic container deployment plugin based on Arquillian has been started by Benjamin Muschko and the folks from Arquillian. One other much asked for feature is already in the 1.7 nightly build:
Up Next in 1.7: A New Way to Create Gradle Projects If you’ve ever set up a new Gradle project, you’ve likely wondered if Gradle had the ability to setup a new build with a template project. Starting with the 1.7 release, Gradle will have the ability to create new Gradle Java projects. This is the first version of a feature that will continue to evolve over time.
The concept is much more than a simple “archetype-based” approach to creating builds. The Build Setup Plugin is an abstraction for setting up Gradle builds and is a common umbrella for templates, project creation, and project conversion. Over time, the Build Setup Plugin will grow to encompass more than just simple templates. We’re planning on adding pluggable templates and the ability to execute custom tasks during project creation.