antBuilder.invokeMethod("taskdef", ImmutableMap.of(
"name", "groovydoc",
"classname", "org.codehaus.groovy.ant.Groovydoc"
));
antBuilder.invokeMethod("groovydoc", new Object[]{args, new Closure<Object>(this, this) {
public Object doCall(Object ignore) {
for (Groovydoc.Link link : links) {
antBuilder.invokeMethod("link", new Object[]{
ImmutableMap.of(
"packages", Joiner.on(",").join(link.getPackages()),