Gradle Release Notes

Version 1.0-milestone-5

  1. New and Noteworthy in 1.0-milestone-5
    1. Experimental C+\+ support
    2. Improved Sonar plugin
    3. Caches handle concurrent access from multiple processes
    4. \--continue command line option
    5. Improved signing plugin
    6. Improved profile report
    7. New DSL extension mechanism for plugins
    8. Repository DSL changes
    9. New dependency management tutorial
  2. New and Noteworthy in 1.0-milestone-4
    1. Application plugin enhancements
    2. New plugin: "ear"
    3. New plugin: "signing"
    4. Easier Ivy repositories
    5. New artifact cache implementation
  3. Fixed Jira Issues

New and Noteworthy in 1.0-milestone-5

Experimental C+\+ support

Some basic support for building binaries and libraries from C++ source is now included in Gradle. Currently only supports gcc. See C++ Support.

Improved Sonar plugin

The Gradle Sonar plugin has been redesigned and rewritten from scratch. It can now analyze a whole project hierarchy at once. This yields a hierarchical view in the Sonar web interface, with aggregated metrics and the ability to drill down into subprojects. Analyzing a project hierarchy at once is also much faster and less likely to run into out-of-memory problems than analyzing each project separately.

The plugin is now configured via proper and well documented configuration objects and offers many sensible defaults. Hooks exist to set custom Sonar properties. The Sonar chapter in the user guide has been revised and enhanced. See Sonar Plugin.

Caches handle concurrent access from multiple processes

All caches maintained by Gradle are now multi-process safe, and much more robust in the face of failures.

This means that you can safely run multiple builds on the same machine. For example, now you can remove any workarounds for your build servers which gave each CI build a separate home directory.

This change means that Gradle will do a much better job of recovering when you kill the build with a ctrl-c or the kill command.

\--continue command line option

When you run Gradle with this command line option, it will continue execution when execution for a task fails, while still honoring task dependencies. Using this option you will get the maximum feedback from a build.

Improved signing plugin

Signatures are now automatically added to the 'archives' configuration, so there is no longer any need for a separate configuration in order to publish to a maven or ivy repository. You can simply use gradle uploadArchives as normal.

Improved profile report

The profile report now includes information about dependency resolution times.

New DSL extension mechanism for plugins

A new mechanism for plugins to use to extend the DSL has been added. See Writing Custom Plugins.

Repository DSL changes

A repositories.maven {} method has been added. The repositories.ivy() method has been improved, so that you can now provide separate patterns for the artifacts and ivy descriptor, or use one of the new built-in layouts. See Repositories.

New dependency management tutorial

A tutorial chapter has been added to the user guide, introducing the basics of dependency management in Gradle. See Dependency Management Basics.

New and Noteworthy in 1.0-milestone-4

Application plugin enhancements

The application plugin now provides direct support for including both static files and extra files generated by your build (e.g. documentation) in the distribution.

New plugin: "ear"

Thanks to the contribution from David Gileadi Gradle now offers a new plugin that deals with creating ear archives in a similar fashion as the war plugin handles the war archives. For more information please refer to the ear plugin chapter in the user guide.

New plugin: "signing"

A new plugin has been added for creating digital signature for files/artifacts as part of the build. With this initial release, the plugin provides support for generating PGP format signatures (which is the signature format required for publication to the Maven Central repository) but will expand to support other signature formats over time.

See the new userguide chapter on the Signing plugin for more information.

Easier Ivy repositories

Method repositories.ivy.artifactPattern() now accepts a relative or absolute file name at the start of the pattern. Some examples:

repositories {
    ivy {
        artifactPattern "${rootDir}/repo/[some-ivy-pattern]"
        artifactPattern "../repo/[some-ivy-pattern]"

New artifact cache implementation

Gradle now uses Wharf under the covers as part of its Ivy integration. Wharf includes Ivy cache and repository implementations, which are much improved over the default Ivy implementations, and which fix many long standing bugs and performance problems. Thanks to Wharf, the infamous 'unknown resolver' error message is now a thing of the past. The Wharf cache has a number of nice features, including storing artifacts by their hash, which allows it do deal well with duplicate artifacts, and caching meta-data on a per-resolver basis, which greatly improves the correctness of the results.

Many thanks to our friends at JFrog for providing Wharf and helping us with the integration work.

One implication of changing the artifact cache implementation is that the artifact cache format has changed. This means that Gradle will download your artifacts into their new locations when you run a build using the new version.

and Gradle 1.0-milestone-4 Breaking Changes

Fixed Jira Issues

Jirra Issues
Type Key Summary Assignee Reporter Priority Status Resolved Created Uploaded Due
GRADLE-1938 Internal Gradle error at org.gradle.api.internal.changedetection.OutputFilesSnapshotter$OutputFilesSnapshot.changesSince( Unassigned Dumitru Daniliuc Resolved Fixed 17/Nov/11 04/Jan/13
GRADLE-1924 Build fails Unassigned Selvin George Resolved Fixed 13/Nov/11 04/Jan/13
GRADLE-1837 'compile project' dependency not working under milestone-5 snapshot Unassigned Chris Beams Resolved Fixed 15/Oct/11 04/Jan/13
GRADLE-1798 Dependency resolution sometimes fails when using the daemon due to $userHome/caches/artifacts/resolved-[org]-[module]-[revision].xml being locked Unassigned Adam Murdoch Resolved Fixed 15/Sep/11 04/Jan/13
GRADLE-1790 Make it easy to configure an ivy repository with standard patterns and a root url Daz DeBoer Daz DeBoer Resolved Fixed 12/Sep/11 04/Jan/13
GRADLE-1789 Repositories.ivy() does not handle dynamic revisions Unassigned Adam Murdoch Resolved Fixed 11/Sep/11 04/Jan/13
GRADLE-1788 Allow ivy artifact patterns to be specified for repositories.ivy(). Daz DeBoer Adam Murdoch Resolved Fixed 11/Sep/11 04/Jan/13
GRADLE-1785 When running the tests in debug mode, set maxParallelForks to 1 Adam Murdoch Adam Murdoch Resolved Fixed 06/Sep/11 04/Jan/13
GRADLE-1779 ResolvedConfiguration.getResolvedArtifacts() contains duplicates Unassigned Peter Niederwieser Resolved Fixed 01/Sep/11 04/Jan/13
GRADLE-1770 eclipse-wtp plugin doesn't respect webAppDirName Szczepan Faber Andrew Oberstar Resolved Fixed 29/Aug/11 04/Jan/13
GRADLE-1762 Changes to environment variables are not made visible when using the daemon Unassigned Adam Murdoch Resolved Fixed 22/Aug/11 04/Jan/13
GRADLE-1760 repositories.ivy() should not cache local artifacts Adam Murdoch Adam Murdoch Resolved Fixed 20/Aug/11 04/Jan/13
GRADLE-1758 tooling api fails to download snapshot distribution Szczepan Faber Szczepan Faber Resolved Fixed 20/Aug/11 04/Jan/13
GRADLE-1756 OS X dock name incorrect with 'application' plugin Adam Murdoch Bernhard Woditschka Resolved Fixed 19/Aug/11 04/Jan/13
GRADLE-1752 Hang in Ivy and/or Wharf Adam Murdoch Joern Huxhorn Resolved Fixed 18/Aug/11 04/Jan/13
GRADLE-1748 Cannot run more than one build at a time when using the daemon Szczepan Faber Adam Murdoch Resolved Fixed 14/Aug/11 04/Jan/13
GRADLE-1747 daemon process has a different working directory to that of the client Unassigned Adam Murdoch Resolved Fixed 14/Aug/11 04/Jan/13
GRADLE-1745 NPE in client when daemon crashes Unassigned Adam Murdoch Resolved Fixed 12/Aug/11 04/Jan/13
GRADLE-1739 Add a factory method named "create" to DependencyHandler that allows to create dependencies without immediately adding them to a configuration Peter Niederwieser Peter Niederwieser Resolved Fixed 10/Aug/11 04/Jan/13
GRADLE-1736 idea/eclipse plugin fails fast when some dependency is unresolved Szczepan Faber Szczepan Faber Resolved Fixed 09/Aug/11 04/Jan/13
GRADLE-1734 eclipse/idea plugin fails miserably when input metadata files were tinkered with Szczepan Faber Szczepan Faber Resolved Fixed 08/Aug/11 04/Jan/13
GRADLE-1732 CommonsHttpClientBackedRepository doesn't support version ranges Unassigned Phil Messenger Resolved Fixed 08/Aug/11 04/Jan/13
GRADLE-1730 Cannot use $GRADLE_OPTS or $JAVA_OPTS to pass arguments containing whitespace to jvm from Gradle scripts Adam Murdoch Adam Murdoch Resolved Fixed 07/Aug/11 04/Jan/13
GRADLE-1727 Artifacts in the new cache has some issues with FileCollections Adam Murdoch Szczepan Faber Resolved Fixed 06/Aug/11 04/Jan/13
GRADLE-1723 impossible to acquire lock problem when resolving dependencies Adam Murdoch Szczepan Faber Resolved Fixed 05/Aug/11 04/Jan/13
GRADLE-1721 Gradle Tooling API M4 NPE while building full Eclipse model for spring-data-redis project Adam Murdoch Kris De Volder Resolved Fixed 04/Aug/11 04/Jan/13
GRADLE-1720 no stack trace when dependency resolution fails awkwardly Adam Murdoch Szczepan Faber Resolved Fixed 04/Aug/11 04/Jan/13
GRADLE-1718 CommonsHttpClientBackedRepository only expects HTTP 200 status code responses Daz DeBoer Phil Messenger Resolved Fixed 04/Aug/11 04/Jan/13
GRADLE-1717 unable to resolve dependencies after clearing entire cache Adam Murdoch Szczepan Faber Resolved Fixed 04/Aug/11 04/Jan/13
GRADLE-1716 Unable to run tests due to wharf exceptions Adam Murdoch Szczepan Faber Resolved Fixed 04/Aug/11 04/Jan/13
GRADLE-1714 Remote repositories hit on every build despite cache causing significant performance degradation Unassigned Doug Lethin Resolved Fixed 03/Aug/11 04/Jan/13
GRADLE-1712 gradlew eclipse fails with NullPointerException Adam Murdoch Ingo Richter Resolved Fixed 03/Aug/11 04/Jan/13
GRADLE-1711 Deprecation warnings are only displayed once for the lifetime of the gradle daemon, rather than on every execution Daz DeBoer Daz DeBoer Resolved Fixed 03/Aug/11 04/Jan/13
GRADLE-1708 Can't specify more than one artifact pattern for ivy repositories Daz DeBoer Levi Hoogenberg Resolved Fixed 01/Aug/11 04/Jan/13
GRADLE-1706 Gradle eclipse/idea plugin breaks when dependency sources jar is not found occasionally Szczepan Faber Wang Liyu Resolved Fixed 29/Jul/11 04/Jan/13
GRADLE-1701 Gradle 1.0-M4 fails to create HierarchicalEclipseProject for spring-integration project Adam Murdoch Kris De Volder Resolved Fixed 28/Jul/11 04/Jan/13
GRADLE-1699 import fails for JavaPlugin in buildSrc Adam Murdoch Philip Crotwell Resolved Fixed 28/Jul/11 04/Jan/13
GRADLE-1697 1.0-milestone-4 a lot slower than 1.0-milestone-3 Adam Murdoch Russel Winder Resolved Fixed 28/Jul/11 04/Jan/13
GRADLE-1678 When using daemon, Zip task creates archive into ~/.gradle when destinationDir is not set Unassigned Daz DeBoer Resolved Fixed 19/Jul/11 04/Jan/13
GRADLE-1672 The "choice" command should not be used in gradle.bat Adam Murdoch Olivier Lefevre Resolved Fixed 11/Jul/11 04/Jan/13
GRADLE-1669 Application plugin script does not set Mac -Xdock:name correctly Adam Murdoch Kelly Robinson Resolved Fixed 08/Jul/11 04/Jan/13
GRADLE-1667 gradle uses wrong Java version on MacOS X 10.5 and later Adam Murdoch Konrad Hinsen Resolved Fixed 07/Jul/11 04/Jan/13
GRADLE-1651 Improve conventional configuration setup so not to encourage unnecessary artifacts being built as inter-project dependencies Luke Daley Luke Daley Resolved Fixed 01/Jul/11 04/Jan/13
GRADLE-1649 Remove default exclude patterns for test tasks Adam Murdoch Luke Daley Resolved Fixed 28/Jun/11 04/Jan/13
GRADLE-1641 Provide some way for plugins to extend a domain object to add a namespace of properties and methods Adam Murdoch Adam Murdoch Resolved Fixed 24/Jun/11 04/Jan/13
GRADLE-1639 CommandLineIntegrationTest fails under windows unless default user Path contains location of correct jdk Adam Murdoch Spencer Allain Resolved Fixed 24/Jun/11 04/Jan/13
GRADLE-1627 Corrupted cache exception on local disk Adam Murdoch Olivier Girardot Resolved Fixed 21/Jun/11 04/Jan/13
GRADLE-1622 Gradle Tooling API EclipseModel silently drops dependencies if they only differ in classifier Daz DeBoer Kris De Volder Resolved Fixed 17/Jun/11 04/Jan/13
GRADLE-1621 Gradle Tooling API fails to build Eclipse model if it can't find source jars for dependencies Peter Niederwieser Kris De Volder Resolved Fixed 17/Jun/11 04/Jan/13
GRADLE-1609 Daemon does not work with Grails Luke Daley Luke Daley Resolved Fixed 13/Jun/11 04/Jan/13
GRADLE-1567 Cannot have more than one version of the same artifact with a different classifier in Ivy cache, causing unpredictable builds Daz DeBoer Luke Daley Resolved Fixed 22/May/11 04/Jan/13
GRADLE-1561 FileSnapshotter class cast exception Adam Murdoch Lee Dickenson Resolved Fixed 17/May/11 04/Jan/13
GRADLE-1489 Assemble in Multi Project build does to much Adam Murdoch Bas Jansen Resolved Fixed 21/Apr/11 04/Jan/13
GRADLE-1472 java.lang.ClassCastException FileCollectionSnapshotImpl cannot be cast to OutputFilesSnapshot Adam Murdoch Ildiko Varga Robey Resolved Fixed 13/Apr/11 04/Jan/13
GRADLE-1385 Disambiguate DSL for using separate Maven repos for POMs and Jars Unassigned Peter Niederwieser Resolved Fixed 11/Feb/11 04/Jan/13
GRADLE-1359 Odd behavior of "gradle jar" if war plugin is present Adam Murdoch Peter Niederwieser Resolved Fixed 28/Jan/11 04/Jan/13
GRADLE-1342 Dependency successfully resolved although it is not available from any of the listed repositories Daz DeBoer Peter Niederwieser Resolved Fixed 24/Jan/11 04/Jan/13
GRADLE-1310 XmlProvider should live in a package other than org.gradle.api.artifacts.maven Adam Murdoch Peter Niederwieser Resolved Fixed 17/Jan/11 04/Jan/13
GRADLE-1269 Project applying War plugin can no longer be used as project lib dependency Adam Murdoch Peter Niederwieser Resolved Fixed 22/Dec/10 04/Jan/13
GRADLE-1250 Gradle Ask Me To Report Unassigned Chris Hane Resolved Fixed 10/Dec/10 04/Jan/13
GRADLE-1241 gradle.bat is behaving incorrectly under 4NT/TCC Adam Murdoch Regis Le Brettevillois Resolved Fixed 01/Dec/10 04/Jan/13
GRADLE-1217 Lack of maven plugin throws ugly NPE when trying to use mavenDeployer Adam Murdoch Baruch Sadogursky Resolved Fixed 14/Nov/10 04/Jan/13
GRADLE-1202 Could not load compiled classes for build file 'build.gradle' from cache Adam Murdoch Charles Anderson Resolved Fixed 02/Nov/10 04/Jan/13
GRADLE-1192 NPE if defining a maven repo without applying the maven plugin Adam Murdoch Tomer Cohen Resolved Fixed 28/Oct/10 04/Jan/13
GRADLE-1166 Corrupted cache exception Adam Murdoch Vince Rosso Resolved Fixed 07/Oct/10 04/Jan/13
GRADLE-1157 'eclipseClasspath' task failed in Gradle-0.9-rc-1 when using client module dependencies + flatDir repo Peter Niederwieser Teo Hui Ming Resolved Fixed 22/Sep/10 04/Jan/13
GRADLE-1154 Hudson build with UncheckedIOException on cache.bin Adam Murdoch Spencer Allain Resolved Fixed 20/Sep/10 04/Jan/13
GRADLE-1109 Dependencies within multiple configurations, containing classifiers, fail to resolve and fail to show an error when attempting to copy the files Daz DeBoer Russ Rollins Resolved Fixed 11/Aug/10 04/Jan/13
GRADLE-1083 daemon hangs after a ctrl-c Unassigned Chris Beams Resolved Fixed 30/Jul/10 04/Jan/13
GRADLE-1022 War includes source jars from other projects when a project dependency is used Adam Murdoch Adam Murdoch Resolved Fixed 07/Jul/10 04/Jan/13
GRADLE-941 Integration tests should all share the same user home dir Unassigned Adam Murdoch Resolved Fixed 19/May/10 04/Jan/13
GRADLE-915 gradle --dependencies loops forever when there is a cycle in the dependency graph Luke Daley Adam Murdoch Resolved Fixed 19/Apr/10 04/Jan/13
GRADLE-739 Better support for downloading dependencies with multiple ext types (jar and zip) and classifiers. Daz DeBoer Kirk Rasmussen Resolved Fixed 11/Nov/09 04/Jan/13
GRADLE-687 Project dependency on a war project includes the war in the compile classpath, not the jar or classes Adam Murdoch Adam Murdoch Resolved Fixed 09/Oct/09 04/Jan/13
GRADLE-612 Improved syntax for "mavenRepo()" URL parameter Adam Murdoch Peter Niederwieser Resolved Fixed 29/Aug/09 04/Jan/13
GRADLE-581 Provide some way to run as many tasks as possible and defer failures until the tasks have completed Unassigned Adam Murdoch Resolved Fixed 01/Aug/09 04/Jan/13

1.0-milestone-5 Migration Guide

Have a look at Gradle 1.0-milestone-5 Release Notes for more information about the new features in this release

  1. Known Issues
  2. Breaking Changes
    1. Artifact publication

Known Issues

There are some known issues in this release. They will be fixed in the next release of Gradle:

Breaking Changes

Artifact publication

The default configuration no longer extends the archives configuration. This means that if you want to make artifacts other than the default Jar available in the compile and runtime classpaths in other projects, you will need to add your additional artifacts to the runtime configuration:

1.0-milestone-4 1.0-milestone-5

artifacts {
    archives myExtraJar

artifacts {
    runtime myExtraJar
Artifacts that you wish to publish, but which should not be included on the classpath, should continue to be added to the archives configuration.

Assemble and Build tasks

The assemble and build tasks now builds only those artifacts added to the archives configuration, rather than all the archive tasks in the project. The assemble task also builds artifacts added indirectly to the archives configuration, such as those added to the runtime configuration. If you need a task that assembles all archives regardless of whether they are published or not, you can create one like this:

task assembleAll(dependsOn: tasks.withType(AbstractArchiveTask))

To change the assemble task back to its old behaviour, you can do:

assemble {    
        dependsOn = tasks.withType(AbstractArchiveTask)

Build script classpath

Jars added to the Gradle distribution (that is, jars that have been manually added and are not part of the standard Gradle distribution) in $gradleHome/lib and $gradleHome/lib/plugins are no longer visible in the build script classpaths. If you wish to make some library available in the build script classpath, you can do this:

buildscript {
    repositories { ... add some repositories ... }
    dependencies {
        classpath 'group:module:version'

Source sets

When a source set is added, the corresponding compile and runtime configurations are also added. Generally, this should not be a problem.

Sonar Plugin

Convention DSL

Convention implementations no longer expose the convention properties and methods on themselves. For example:

apply plugin: 'java'
// no longer works
project.convention.sourceCompatibility = 1.6
// still works
project.sourceCompatibility = 1.6
sourceCompatibility = 1.6    

Repository APIs

The APIs that provide the repository DSL have changed. These changes should generally be backwards compatible from the DSL.

Project methods

The TaskContainer.getByName() method was unintentionally available via Project in previous releases. You should instead use one of the supported methods for accessing a task:




// or
// orproject.someTask

See the user guide for more details on locating tasks.

Deprecated API methods