Gradle 1.0-milestone-7 Migration Guide

Skip to end of metadata
Go to start of metadata
Have a look at Gradle 1.0-milestone-7 Release Notes for more information about the new features in this release

Known Issues

Cannot call Task.execute() from task actions

Although it is not a supported mechanism, some builds make use of the Task.execute() method to execute a task from some other task. This is broken in Gradle 1.0-milestone-7, so that calling execute() throws an IllegalStateException.

Maven snapshot artifacts not updated

When artifacts for a maven snapshot module (or any changing module) are updated, Gradle 1.0-milestone-7 fails to detect and download the updated artifacts. This occurs regardless of the setting for
cacheChangingModulesFor. As a workaround, you can update the POM file for the snapshot so that Gradle detects that the module has changed: it will then download the snapshot artifacts.

See http://forums.gradle.org/gradle/topics/failure_to_detect_changing_snapshot_dependencies_in_m7_works_in_m6 for more discussion.

Using mavenLocal() causes spurious HTTP requests

Using mavenLocal() as a repository results in a lot of HTTP requests for *-javadoc.jar and *-sources.jar. This occurs during pom parsing, and is not helped by caching.

This issue can be mitigated:

  • Don't use mavenLocal() unless you really need to consume artifacts published locally by maven.
  • Place mavenLocal() last in the list of repositories if it is required.
  • Upgrade to a newer nightly: http://gradle.org/nightly

Don't use mavenLocal() if your only goal is to reduce remote downloads. In M7, Gradle will reuse artifacts from an .m2 repository even without mavenLocal() declared.

See http://wiki.gradle.org/display/GRADLE/Gradle+1.0-milestone-7+Release+Notes#Gradle1.0-milestone-7ReleaseNotes-Betterreuseofpreviouslydownloadedartifacts.

Notable deprecations

Source sets

Named parameter buildBy has been deprecated and replaced with builtBy.

previous versions 1.0-milestone-7

Breaking Changes

Stricter artifact resolution

See the release notes for more details.

Per-dependency exclude rules no longer may span to the entire configuration.

If your intention is to exclude a transitive dependency for the entire configuration please do:

configuration.compile.exclude group: "org.unwanted", module: "unwanted"

For motivations and details please see the release notes.

Source encoding for GroovyCompile task now defaults to UTF-8

Previously the Groovy compiler's US-ASCII default was used. Since UTF-8 is compatible with US-ASCII, we don't expect any problems.

Labels:
breaking-changes breaking-changes Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.