GroovyObject
public abstract class AntBuilder extends AntBuilder
An AntBuilder
allows you to use Ant from your build script.
Modifier and Type | Class | Description |
---|---|---|
static class |
AntBuilder.AntMessagePriority |
Represents the normal Ant message priorities.
|
Constructor | Description |
---|---|
AntBuilder() |
Modifier and Type | Method | Description |
---|---|---|
AntBuilder |
getAnt() |
Returns this AntBuilder.
|
abstract AntBuilder.AntMessagePriority |
getLifecycleLogLevel() |
Returns the Ant message priority that corresponds to the Gradle "lifecycle" log level.
|
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.
|
void |
setLifecycleLogLevel(String logLevel) |
Sets the Ant message priority that should correspond to the Gradle "lifecycle" log level.
|
abstract void |
setLifecycleLogLevel(AntBuilder.AntMessagePriority logLevel) |
Sets the Ant message priority that should correspond to the Gradle "lifecycle" log level.
|
buildAttributes, createNode, createNode, createNode, createNode, createProject, doInvokeMethod, getAntProject, getAntXmlContext, getProject, isSaveStreams, nodeCompleted, setParent, setSaveStreams, setText
getCurrent, getName, invokeMethod, invokeMethod, postNodeCompletion, setClosureDelegate, setCurrent
getMetaClass, getProperty, setMetaClass, setProperty
public abstract Map<String,Object> getProperties()
public abstract Map<String,Object> getReferences()
public abstract void importBuild(Object antBuildFile)
antBuildFile
- The build file. This is resolved as per Project.file(Object)
.public abstract void importBuild(Object antBuildFile, Transformer<? extends String,? super String> taskNamer)
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(Object)
.taskNamer
- A transformer that calculates the name of the Gradle task for a corresponding Ant target.public AntBuilder getAnt()
public abstract void setLifecycleLogLevel(AntBuilder.AntMessagePriority logLevel)
logLevel
- The Ant log level to map to the Gradle lifecycle log levelpublic void setLifecycleLogLevel(String logLevel)
logLevel
- The Ant log level to map to the Gradle lifecycle log levelpublic abstract AntBuilder.AntMessagePriority getLifecycleLogLevel()