Convert antlib to gradle

Hello ,

We have plenty of custom tasks in ant which we are trying to migrate to Gradle . All custom tasks are defined in antlib.xml . Is it a possible to convert antlib to something gradle equivalent or one need to go via ant import & taskdef options only?

If we continue to import ant , we kind of defeats the purpose of moving from ant to gradle … in which we might end up doing same things we currently do just by using ant in different way.