<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj" -->

---
title: Side Quest: How Gradle Is Removing Ant | daily.dev
description: Gradle 9.9.0 deprecates its built-in Ant integration, with full removal planned for Gradle 10. A hackathon team found Ant backing 58 imports across 12 Gradle...
canonical: https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Side Quest: How Gradle Is Removing Ant | daily.dev
og:description: Gradle 9.9.0 deprecates its built-in Ant integration, with full removal planned for Gradle 10. A hackathon team found Ant backing 58 imports across 12 Gradle...
og:url: https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj
og:image: https://api.daily.dev/og/posts/LRixyFfgJ.png
og:image:alt: Side Quest: How Gradle Is Removing Ant
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Side Quest: How Gradle Is Removing Ant

**[Gradle Blog](https://daily.dev/sources/gradle-blog)** · 8 min read · 0 upvotes · 0 comments

## Summary

Gradle 9.9.0 deprecates its built-in Ant integration, with full removal planned for Gradle 10. A hackathon team found Ant backing 58 imports across 12 Gradle features. Gradle 10 will also stop putting Ant classes on the build script classpath. The team cites costs like breaking the Configuration Cache and tying the public API to Groovy. Internal Ant usage in the PMD, CodeNarc, and Checkstyle plugins will be removed separately, on its own schedule. The post gives migration paths: Gradle task equivalents, calling tools directly, a `filter(Transformer)` replacement, or adding Ant back manually via the buildscript classpath.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.gradle.org/side-quest-removing-ant>

## Questions this post answers

### Why is Gradle removing its built-in Ant integration?

A modern Gradle build shouldn't need Ant, and carrying it holds Gradle back. The Ant integration isn't fully compatible with the Configuration Cache, importing an Ant build disables Configuration Cache entirely, and it ties Gradle's public API to Groovy because AntBuilder relies on Groovy's own AntBuilder implementation.

_Teams planning a Gradle upgrade can track breaking changes like this one on daily.dev._

### Which Gradle classes and methods related to Ant are deprecated in Gradle 9.9.0?

AntBuilder, AntTarget, AntBuilderAware, Project.getAnt(), Project.ant(Closure), Project.ant(Action), Project.createAntBuilder(), Task.getAnt(), FileCollection.addToAntBuilder() in both overloads, FileCollection.AntType, and PatternSet.addToAntBuilder() are all deprecated in 9.9.0 and scheduled for removal in Gradle 10, along with implicit Ant classes on the build script classpath.

_Developers auditing deprecations before a major version bump can check specifics like these on daily.dev._

### How do I replace an Ant ReplaceTokens filter in a Gradle Copy task without using Ant?

Use a plain `filter { }` block in the Copy task that swaps tokens in a single pass with a regex built from the token map, declaring the tokens as task inputs via inputs.properties(tokens) so up-to-date checks work. This replicates ReplaceTokens behavior as long as no token key contains a line break; for multiline tokens, write a custom java.io.FilterReader or add Ant back via the buildscript classpath.

_Developers migrating off Ant tasks can find working Gradle code patterns like this on daily.dev._

## Similar posts on daily.dev

- [Gradle Is Going Agentic](https://daily.dev/posts/gradle-is-going-agentic-fslyzb3lk) · Gradle Blog · 6 upvotes · 1 comments
- [Update your Kotlin projects for Android Gradle Plugin 9.0](https://daily.dev/posts/update-your-kotlin-projects-for-android-gradle-plugin-9-0-ffcwkzh3q) · JetBrains · 3 upvotes · 0 comments
- [Scaling ArchUnit with Nebula ArchRules](https://daily.dev/posts/scaling-archunit-with-nebula-archrules-wq8orcpcc) · Netflix TechBlog · 13 upvotes · 0 comments
- [How Gradle Is Javamaxxing](https://daily.dev/posts/how-gradle-is-javamaxxing-knrrqwz9d) · Gradle Blog · 28 upvotes · 1 comments

---

Tags: [#java](https://daily.dev/tags/java), [#gradle](https://daily.dev/tags/gradle)

[View this post on daily.dev](https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Side Quest: How Gradle Is Removing Ant","url":"https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj"},"datePublished":"2026-10-29T14:25:31.652Z","dateModified":"2026-10-29T14:25:59.587Z","description":"Gradle 9.9.0 deprecates its built-in Ant integration, with full removal planned for Gradle 10. A hackathon team found Ant backing 58 imports across 12 Gradle...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d404d2a166059edc715594b9b890a383?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d404d2a166059edc715594b9b890a383?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Gradle Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Gradle Blog","logo":"https://media.daily.dev/image/upload/s--Mtc4Cp4O--/f_auto,q_auto/v1773648768/logos/gradle-blog?_a=BAMAMiiu0","url":"https://daily.dev/sources/gradle-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,gradle","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Gradle Blog","item":"https://daily.dev/sources/gradle-blog"},{"@type":"ListItem","position":3,"name":"Side Quest: How Gradle Is Removing Ant"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/side-quest-how-gradle-is-removing-ant-lrixyffgj#faq","mainEntity":[{"@type":"Question","name":"Why is Gradle removing its built-in Ant integration?","acceptedAnswer":{"@type":"Answer","text":"A modern Gradle build shouldn't need Ant, and carrying it holds Gradle back. The Ant integration isn't fully compatible with the Configuration Cache, importing an Ant build disables Configuration Cache entirely, and it ties Gradle's public API to Groovy because AntBuilder relies on Groovy's own AntBuilder implementation. Teams planning a Gradle upgrade can track breaking changes like this one on daily.dev."}},{"@type":"Question","name":"Which Gradle classes and methods related to Ant are deprecated in Gradle 9.9.0?","acceptedAnswer":{"@type":"Answer","text":"AntBuilder, AntTarget, AntBuilderAware, Project.getAnt(), Project.ant(Closure), Project.ant(Action), Project.createAntBuilder(), Task.getAnt(), FileCollection.addToAntBuilder() in both overloads, FileCollection.AntType, and PatternSet.addToAntBuilder() are all deprecated in 9.9.0 and scheduled for removal in Gradle 10, along with implicit Ant classes on the build script classpath. Developers auditing deprecations before a major version bump can check specifics like these on daily.dev."}},{"@type":"Question","name":"How do I replace an Ant ReplaceTokens filter in a Gradle Copy task without using Ant?","acceptedAnswer":{"@type":"Answer","text":"Use a plain `filter { }` block in the Copy task that swaps tokens in a single pass with a regex built from the token map, declaring the tokens as task inputs via inputs.properties(tokens) so up-to-date checks work. This replicates ReplaceTokens behavior as long as no token key contains a line break; for multiline tokens, write a custom java.io.FilterReader or add Ant back via the buildscript classpath. Developers migrating off Ant tasks can find working Gradle code patterns like this on daily.dev."}}]}
```

