org.gradle.api

## Class AntBuilder

- java.lang.Object
- - groovy.lang.GroovyObjectSupport
  - - groovy.util.BuilderSupport
    - - groovy.util.AntBuilder
      - - org.gradle.api.AntBuilder

- All Implemented Interfaces:
    GroovyObject

      public abstract class AntBuilder
      extends AntBuilder

  An `AntBuilder` allows you to use Ant from your build script.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AntBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AntBuilder` | `getAnt()` Returns this AntBuilder.
    `abstract Map<String,Object>` | `getProperties()` Returns the properties of the Ant project.
    `abstract Map<String,Object>` | `getReferences()` Returns the references of the Ant project.
    `abstract void` | `importBuild(Object antBuildFile)` Imports an Ant build into the associated Gradle project.
    `abstract void` | `importBuild(Object antBuildFile, Transformer<? extends String,? super String> taskNamer)` Imports an Ant build into the associated Gradle project, potentially providing alternative names for Gradle tasks that correspond to Ant targets.

    - ### Methods inherited from class groovy.util.AntBuilder

      `buildAttributes, createNode, createNode, createNode, createNode, createProject, doInvokeMethod, getAntProject, getAntXmlContext, getProject, isSaveStreams, nodeCompleted, setParent, setSaveStreams, setText`

    - ### Methods inherited from class groovy.util.BuilderSupport

      `getCurrent, getName, invokeMethod, invokeMethod, postNodeCompletion, setClosureDelegate, setCurrent`

    - ### Methods inherited from class groovy.lang.GroovyObjectSupport

      `getMetaClass, getProperty, setMetaClass, setProperty`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AntBuilder

          public AntBuilder()

  - ### Method Detail

    - #### getProperties

          public abstract Map<String,Object> getProperties()

      Returns the properties of the Ant project. This is a live map, you that you can make changes to the map and these changes are reflected in the Ant project.
      Returns:
        The properties. Never returns null.

    - #### getReferences

          public abstract Map<String,Object> getReferences()

      Returns the references of the Ant project. This is a live map, you that you can make changes to the map and these changes are reflected in the Ant project.
      Returns:
        The references. Never returns null.

    - #### importBuild

          public abstract void importBuild(Object antBuildFile)

      Imports an Ant build into the associated Gradle project.
      Parameters:
        `antBuildFile` - The build file. This is resolved as per `Project.file(Object)`.

    - #### importBuild

          @Incubating
          public abstract void importBuild(Object antBuildFile,
                                    Transformer<? extends String,? super String> taskNamer)

      Imports an Ant build into the associated Gradle project, potentially providing alternative names for Gradle tasks that correspond to Ant targets.

      For each Ant target that is to be converted to a Gradle task, the given `taskNamer` receives the Ant target name as input and is expected to return the desired name for the corresponding Gradle task. The transformer may be called multiple times with the same input. Implementations should ensure uniqueness of the return value for a distinct input. That is, no two inputs should yield the same return value.

      Parameters:
        `antBuildFile` - The build file. This is resolved as per `Project.file(Object)`.
        `taskNamer` - A transformer that calculates the name of the Gradle task for a corresponding Ant target.

    - #### getAnt

          public AntBuilder getAnt()

      Returns this AntBuilder. Useful when you need to pass this builder to methods from within closures.
      Returns:
        this