What Is New in Gradle 1
Gradle 1.0 introduces a stable foundation for the build tool, focusing on core performance, dependency management, and plugin improvements. The table below summarizes the key changes.
| Category | Key Updates |
|---|---|
| New Features | Support for Maven POM-only dependencies, new incubating features for publishing and tooling API. |
| Performance & Core | Faster dependency resolution, improved incremental build, reduced memory footprint. |
| Dependency Management | Enhanced Ivy compatibility, improved conflict resolution, support for dynamic version caching. |
| Plugins & DSL | Stable Java plugin, improved plugin DSL, better multi-project build support. |
| Bug Fixes | Numerous fixes in dependency resolution, task execution, and IDE integration. |
| Deprecated Features | Legacy build listener APIs and some old DSL patterns are now deprecated. |
How does dependency resolution get faster in Gradle 1?
Gradle 1.0 speeds up dependency resolution through smarter caching and parallel downloads. It now caches dynamic version listings and artifact metadata, which cuts down on network calls for repeated builds. In practice, this means your clean builds, especially with changing version ranges, will complete significantly quicker.
Maven POM-Only Dependency Support
A notable addition is the ability to depend on Maven artifacts that only provide a POM file. This resolves a common pain point when working with certain Maven repositories where the POM defines dependencies, but the main artifact might be empty or bundled differently.
What improvements were made for Ivy users?
Gradle 1.0 strengthens its compatibility with Apache Ivy repositories and patterns. It handles Ivy dependency descriptors more accurately, improving conflict resolution when the same module is declared with different artifacts. This matters because it provides more reliable builds in mixed Ivy/Maven environments.
The update also refines how Ivy dynamic revisions are cached. Previously, checking for new revisions could be slow; now, cached data is reused more intelligently while still respecting timeout settings.
What's new with the Java plugin and DSL?
The Java plugin is now considered stable and reliable for production use. Its configuration has been streamlined, and it integrates seamlessly with the enhanced dependency management features. You can expect fewer surprises when building standard Java projects.
For plugin authors, the DSL for defining plugins and tasks has been improved for clarity. The incubating new publishing plugin also offers a preview of a modern way to define publications, though it's not yet finalized for this release.
FAQ
Can I use Gradle 1.0 with projects that only have Maven POM files?
Yes. This version adds explicit support for resolving dependencies from Maven artifacts that only publish a POM file. Gradle will read the dependencies from the POM, which is common for parent or BOM-style artifacts.
How does the improved incremental build work?
Gradle 1.0 does a better job of tracking input and output files for tasks. If it detects that a task's source files haven't changed and its outputs are intact, it will skip execution. This reduces build times during development iterations.
Are there any breaking changes I should watch for?
The main breaking changes involve deprecated APIs from earlier milestones being removed. Specifically, some legacy build listener and logging interfaces have been taken out. Check your custom listeners or plugins that might rely on very old Gradle APIs.
What is the "tooling API" mentioned as an incubating feature?
The Tooling API is a new programmatic interface for embedding Gradle into IDEs and other tools. It's in an incubating state in 1.0, meaning it's available for experimentation but its API might change in future releases. It aims to provide a stable, long-term integration point.
Does Gradle 1.0 fix issues with dependency version conflicts?
Yes, several bug fixes and improvements target dependency conflict resolution. The engine now handles version mismatches and artifact selection more predictably, especially in complex multi-project builds with transitive dependencies.