Create new ant target into custom plugin gradle with kotlin

Hello guys,

I am new in the Gradle world and I have some question for creating my plugin for using a task ant, an example:
Tomcat has a target for life-cycle for a webb app with target and now I want to recreate my personal plugin where the plugin using task ant the tomcat-api.

Can you give me any example and any reference for creating this plugin with kotlin, please?

Sorry for my terrible English but I’m learning