Migrate from Apache Ant
- Last Updated: March 25, 2026
- 2 minute read
- OpenEdge DevOps Framework
- Version 2.4
- Documentation
Many ABL applications make use of Apache Ant and PCT. Apache Ant is a build automation tool that uses XML and Java, and it was designed to make build processes simpler and more portable. Ant uses targets and tasks to compile, test, and run applications. It is primarily used for Java applications, but can be used for other types of applications as well. PCT is an open source set of Apache Ant tasks and plugins created by Riverside Software that automate work in OpenEdge. PCT is a large ecosystem of plugins that provides common build steps for automation and CI/CD.
Why migrate from Ant to Gradle?
- Gradle uses a domain-specific language, which allows users to add logic to the build pipeline.
- Gradle has reusable tasks and can reuse other parts of a build pipeline, which makes the build script less verbose, more readable, and easier to maintain.
- Gradle provides smarter dependency management than Ant.
- Gradle make builds modular, which allows larger projects to be built from interdependent parts. You can even build multiple projects from the same pool of parts.
Use ant.importBuild
ant.ImportBuild is a straightforward and quick way
to migrate your build processes from PCT or Ant to Gradle. This task converts Ant
targets in your Ant scripts into Gradle tasks. To use
ant.ImportBuild:- Add the following to your
build.gradlefile in your project:
This assumesant.ImportBuild 'build.xml'build.xmlcontains your previous Ant tasks. - After saving your
build.gradlefile, run your previous Ant tasks using the Gradle wrapper:gradlew ant target
Using ant.ImportBuild works quite well as an
initial phase of migrating to Gradle, but it is not a full migration because you
still need to maintain your existing Ant scripts.