Migrating ant into gradle

How do we migrate this one into gradle. Any suggestions

There is ‘ant.importBuild’ (see Gradle User Guide), but in most cases it’s better to write a Gradle build from scratch, comparing the outputs of the Ant and Gradle builds along the way.