When considering leveraging an existing investment in Apache Ant, or perhaps
using the broad set of tasks that the Ant community has created, Gradle
has a great story to tell. Gradle offers a complete superset of Ant. In
fact, it makes Gradle’s use of Ant simpler than directly using Ant, partly
by leveraging Groovy’s
functionality. Gradle brings in everything from the Ant namespace into the
Gradle namespace such that using a core Ant task is as easy as calling
Discussing the usage of Ant from Gradle provides a great bridge in terms of progressive migration to a pure Gradle strategy. Over time though, we believe you’ll desire to standardize on the more powerful Gradle feature set by using native Gradle components or by wraping any Ant behavior in a Gradle plug-in. The latter maintains the value of the functioning Ant behavior while fully enabling build-by-convention throughout the updated Gradle build ecosystem. With full awareness of the quantity of existing Ant infrastructure and value of leveraging it via the new build tool, Gradle ships with a full copy of Ant, thus making Ant’s default tasks available to every Gradle build. To aid with this mind-set remapping, we’ll discuss how Gradle compares to Ant, providing parallels in the approaches to writing builds and to each tool’s unique terminology.
Gradle is occasionally described as a Groovy-based Ant. That would be the role that Gant fills, but Gradle has much more ...