api / org.gradle.api / AntBuilder

AntBuilder

abstract class AntBuilder : AntBuilder

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

Types

AntMessagePriority

class AntMessagePriority

Represents the normal Ant message priorities.

Constructors

<init>

AntBuilder()

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

Functions

getAnt

open fun getAnt(): AntBuilder

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

getLifecycleLogLevel

abstract fun getLifecycleLogLevel(): AntMessagePriority

Returns the Ant message priority that corresponds to the Gradle "lifecycle" log level.

getProperties

abstract fun getProperties(): MutableMap<String, Any>

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.

getReferences

abstract fun getReferences(): MutableMap<String, Any>

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.

importBuild

abstract fun importBuild(antBuildFile: Any): Unit

Imports an Ant build into the associated Gradle project.

abstract fun importBuild(antBuildFile: Any, taskNamer: Transformer<out String, in String>): Unit

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.

setLifecycleLogLevel

abstract fun setLifecycleLogLevel(logLevel: AntMessagePriority): Unit

Sets the Ant message priority that should correspond to the Gradle "lifecycle" log level. Any messages logged at this priority (or more critical priority) will be logged at least at lifecycle in Gradle's logger. If the Ant priority already maps to a higher Gradle log level, it will continue to be logged at that level.

open fun setLifecycleLogLevel(logLevel: String): Unit

Sets the Ant message priority that should correspond to the Gradle "lifecycle" log level. Any messages logged at this priority (or more critical priority) will be logged at least at lifecycle in Gradle's logger. If the Ant priority already maps to a higher Gradle log level, it will continue to be logged at that level. Acceptable values are "VERBOSE", "DEBUG", "INFO", "WARN", and "ERROR".