An AntBuilder
allows you to use Ant from your build script.
Type | Name and description |
---|---|
AntBuilder |
getAnt() Returns this AntBuilder. |
Map<String, Object> |
getProperties() Returns the properties of the Ant project. |
Map<String, Object> |
getReferences() Returns the references of the Ant project. |
void |
importBuild(Object antBuildFile) Imports an Ant build into the associated Gradle project. |
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 | Name |
---|---|
class AntBuilder |
getProject, getAntXmlContext, isSaveStreams, setSaveStreams, getAntProject, invokeMethod, invokeMethod, getMetaClass, setMetaClass, setProperty, getProperty, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class BuilderSupport |
invokeMethod, invokeMethod, getMetaClass, setMetaClass, setProperty, getProperty, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Returns this AntBuilder. Useful when you need to pass this builder to methods from within closures.
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 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.
Imports an Ant build into the associated Gradle project.
antBuildFile
- The build file. This is resolved as per Project.file.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.
antBuildFile
- The build file. This is resolved as per Project.file.taskNamer
- A transformer that calculates the name of the Gradle task for a corresponding Ant target.