Migrating from an Ant-based project
Ant is one of the initial and most popular build tools, which made build and deployment processes much simpler as compared to other native script-based build tools. Still, you can find many projects that use Ant build script to build the project. Ant was developed on the philosophy of imperative programming model, which tells the system what to do and also how to do it. Thus, you have the benefit of controlling each and every action or step of your build script. The following is the sample Ant build script to build any Java project. Here, we are considering only minimal required tasks to build a Java project, since our purpose is to discuss the strategies to migrate from Ant scripts to Gradle scripts:
<project name="Ant build project" default="createJar"> <target name="clean" description="clean the existing dirs"> <delete dir="build"/> <delete dir="dist"/> </target> <target name="compile" description="compile...