Skip to end of metadata
Go to start of metadata
  1. #New and Noteworthy
  2. #Migrating from 0.7
  3. #Credits
  4. #Fixed Jira Issues

New and Noteworthy

Gradle GUI

Gradle now ships with a GUI, which you can use to explore and run builds. To try it out, run gradle --gui.

For more details, see the user guide

Scala support

Gradle can now build Scala projects. This works the same way as Java and Groovy projects: Simply usePlugin 'scala' and add your Scala source to src/main/scala and src/test/scala. Then, running gradle build will compile, test and JAR your project. As always, source locations, Scala versions, and so on, are completely configurable.

The Scala plugin supports joint compilation of Scala and Java source, for projects which have Java classes which use Scala classes and vice versa. You can mix any combintation of Java, Groovy and Scala source in your project.

For more details, see the user guide

Checkstyle support

Checkstyle is supported for projects with Java source. Simply usePlugin 'code-quality' and add your Checkstyle configuration file at config/checkstyle/checkstyle.xml. Gradle will take care of running Checkstyle on all your production and test source as part of the build task.

For more details, see the user guide

CodeNarc support

CodeNarc is supported for projects with Groovy source. Simply usePlugin 'code-quality' and add your CodeNarc configuration file at config/codenarc/codenarc.xml. Gradle will run CodeNarc on all your production and test source as part of the build task.

For more details, see the user guide

More flexible project layouts

With the introduction of source sets to the Java plugin, Gradle can now handle many different project layouts very conveniently. You can easily add or change the source directories of the project in very flexible ways. Want your source files and resources in the same directory? No problem. Want all the projects to share the same source directory? Production and test source in the same location? Multiple source directories? All easily done.

Source sets let you easily add additional logical groups of source code, with their own compile and runtime classpaths. You can use this to, for example, add an integration test suite with its own compile and runtime classpaths is easy. Or separate source files which are to be compiled using different Java versions. Or as an alternative to the buildSrc project to contain classes used in your build.

Source sets are available for Java, Groovy and Scala projects.

For more details, see the user guide

Improvements to the Java project lifecycle

Three tasks have been added to the Java plugin:

  • The build task builds and tests the current project.
  • The buildNeeded task builds and tests all projects which the current project depends on.
  • The buildDependents task builds and tests all projects which depend on the current project. This can be useful for testing your changes to ensure they haven't broken any projects which depend on the project you have changed.

For more details, see the user guide

Initialization script support

You can use an initialization script to configure and change pretty much any aspect of Gradle you like. All of the APIs available in the build script are available in the initialization script.

For more details, see the user guide

Improved command-line

You can exclude a task from executing, by using the -x command-line option with the name of the task to exclude. Dependencies of the excluded task are also excluded, unless they are required by another task.

You no longer need to provide a complete task name on the command-line. You can provide the first few characters of the task name, and, provided this unambigously identifies the task, Gradle will figure out what you mean. You can also use camel case abbreviations for task names, like you can in an IDE. For example, you can type gradle exDB instead of gradle explodedDistBase. Gradle will also give you some suggestions if you make a typo in the task name.

Finally, we have improved error reporting. The error messages are better laid-out, and Gradle will give you some suggestions about where to go next to resolve the problem. These suggestions are pretty basic at the moment, but will improve over subsequent releases.

For more details, see the user guide

Improved support for file handling

Gradle provides new powerful domain objects to work with the file system. You can define file collections and file trees, add them, visit their elements and apply filters. You can copy them around and many other tasks/domain objects take them as input.

For more details, see the user guide

Writing custom tasks is now easier

Custom tasks no longer need a special constructor. Also, we've added a tutorial chapter to the user guide which describes how to implement a custom task.

For more details, see the user guide

Performance improvements

There have been a number of performance improvements on Gradle 0.8. Dependency resolution is faster, building Groovy projects is much faster, Gradle startup and project evaluation is faster.

Migrating from 0.7

Gradle 0.8 Breaking Changes

Credits

Many thanks to Mike and John Murph from Automated Logic for the fantastic Gradle UI and other contributions. Many thanks to Ross Black for the excellent Scala Plugin. A special thanks to Tomek Kaczanowski for all his work around the Gradle documentation. Thanks for their Jira's/patches/feedback to Andrei Sereda, Carlton Joseph, Daniel Mueller, Hamlet D'Arcy, Jacob Grydholt, Jiri Mares, Jon Cox, Levi Hoogenberg, Marc Guillemot, Martin Vlcek, Peter L., Philip Crotwell.

Fixed Jira Issues

Labels: