hey-hey,
I’m converting Gradle plugins written in Groovy to Java. I have some tasks using ant
, e.g.:
ant.taskdef(name: "wsimport", classname: "com.sun.tools.ws.ant.WsImport", classpath: wsimportClasspath)
ant.wsimport(
package: packageName,
sourcedestdir: genJaxbDir,
wsdl: wsdlFile.toURI()
)
How I can translate this to DefaultTask
using Java? I have access to AntBuilder
in my task and I can do something like that:
AntBuilder ant = getProject().getAnt();
ant.invokeMethod("echo", "hello, world!");
What I don’t understand, how I can add Ant task definition with name, classpath, parameters etc.