# importBuild

abstract fun importBuild(antBuildFile: Any)(source)

Imports an Ant build into the associated Gradle project.

#### Since

0.7

#### Parameters

antBuildFile

The build file. This is resolved as per file.

abstract fun importBuild(antBuildFile: Any, baseDirectory: String)(source)

Imports an Ant build into the associated Gradle project, specifying the base directory for Gradle tasks that correspond to Ant targets.

By default the base directory is the Ant build file parent directory. The relative paths are relative to getProjectDir.

#### Since

7.1

#### Parameters

antBuildFile

The build file. This is resolved as per file.

baseDirectory

The base directory. This is resolved as per file.

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

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.

#### Since

2.2

#### Parameters

antBuildFile

The build file. This is resolved as per file.

taskNamer

A transformer that calculates the name of the Gradle task for a corresponding Ant target.

abstract fun importBuild(antBuildFile: Any, baseDirectory: String, taskNamer: Transformer<out @NotNull String, in String>)(source)

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

By default the base directory is the Ant build file parent directory. The relative paths are relative to getProjectDir.

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.

#### Since

7.1

#### Parameters

antBuildFile

The build file. This is resolved as per file.

baseDirectory

The base directory. This is resolved as per file.

taskNamer

A transformer that calculates the name of the Gradle task for a corresponding Ant target.