Gradle can import Ant build scripts into your project. Gradle integrates deeply with the Ant build. Every Ant target is represented as a Grade task. This task can be further enhanced in your Gradle build script. The integration even works in both ways. You can depend on Gradle tasks in your build.xml. In addition, accessing and modifying Ant properties from your build script is now much easier.
See UG 14 for details.
You can now declare the classpath to compile and execute a build script in the build script itself. You no longer require a settings.gradle file to specify this classpath. In addition, each build script in a multi-project build can specify its own classpath.
See UG 28.2 for details.
You can now declare dependencies using a collection of Files. This can be a simple alternative to using a repository, or if you want complete control over which files are used for certain dependencies.
See UG 25.3.5 for details.
The Configuration class now offers a files method to retrieve the files for a subset of the configuration dependencies.
See UG 25.4 for details.
The Copy task now provides a rich API for specifying source and destination files, and finer-grained control over file inclusion and exclusion. Also, the Copy task now provides the ability to rename files and filter content as they are copied.
See the Javadoc for the Copy task for more details.
With the -m option you can execute the Gradle build with all task actions disabled. That way you can see what and in which order a particular Gradle build executes.
See UG 9.4 for details.
Gradle has improved its API to be easily used in an embedded way. This is not covered in the UG yet. There is just a placeholder chapter: UG 31. Stay tuned for improved documentation on this important issue.
Gradle provides now listeners for plugin usage. A build script or other plugins can add such listeners. They get informed about plugins that are already available and as soon as a new plugin comes into use.
Again many thanks to Steve Appling and his team for all their valuable patches and their feedback. Steve contributed for example the new copy functionality and the ground work for build optimization that we plan to fully deliver with Gradle 0.8. Many thanks also to Tomek Kaczanowski for the docbook user's guide patches. Thanks to Dierk König, Donal McNamee, Galder Zamarreño, Haug Bürger, Jerod Lass, Marc Guillemot, Markus Kobler, Mike, Niko Schmuck, Paul Gier, Peter Niederwieser for their Jira's and other feedback.
Build scripts and plugins are now executed using Groovy 1.6.3. While most build scripts should be fine with this change, this does have the potential to break some existing builds.
The Java plugin inter-task dependencies have changed. See UG 16.1.
There is also no init task any longer for the Java plugin. Use:
build.taskGraph.whenReady {
// do something
}
to do stuff that should be done before any task gets executed.
The eclipse tasks have been split out of the Java plugin and into a new 'eclipse' plugin.
usePlugin 'eclipse'
The unmanaged classpath from the compile and compileTests tasks have been merged into the compile and testCompile configurations respectively. These are also inherited by the runtime and testRuntime configurations.
0.6 | 0.7 |
---|---|
compile.unmanagedClasspath(...some files...) | dependencies { compile files(..some files..) } |
public interface Plugin {
void apply(Project project, PluginRegistry pluginRegistry, Map<String, ?> customValues);
}
to
public interface Plugin {
void use(Project project, ProjectPluginsContainer projectPluginsHandler);
}
Most plugins just use the project argument and therefore simply to need to change the signature to work again.