Context

Added in 4.2.0
Deprecated in 7.0.0

interface Context


Context for the transform.

This gives access to a limited amount of context when the transform is run.

Summary

Public functions

LoggingManager!

Returns the LoggingManager which can be used to control the logging level and standard output/error capture for this task.

String!

Returns the path of the task, which is a fully qualified name for the task.

String!

Returns the project name containing the task.

File!

Returns a directory which this task can use to write temporary files to.

String!

Returns the name of the variant.

WorkerExecutor!

Returns the org.gradle.workers.WorkerExecutor to enlist runnable pieces of work.

Public functions

getLogging

Added in 4.2.0
Deprecated in 7.0.0
fun getLogging(): LoggingManager!

Returns the LoggingManager which can be used to control the logging level and standard output/error capture for this task. By default, System.out is redirected to the Gradle logging system at the QUIET log level, and System.err is redirected at the ERROR log level.

Returns
LoggingManager!

the LoggingManager. Never returns null.

getPath

Added in 4.2.0
Deprecated in 7.0.0
fun getPath(): String!

Returns the path of the task, which is a fully qualified name for the task. The path of a task is the path of its Project plus the name of the task, separated by :.

Returns
String!

the path of the task, which is equal to the path of the project plus the name of the task.

getProjectName

Added in 4.2.0
Deprecated in 7.0.0
fun getProjectName(): String!

Returns the project name containing the task.

Returns
String!

the getName

getTemporaryDir

Added in 4.2.0
Deprecated in 7.0.0
fun getTemporaryDir(): File!

Returns a directory which this task can use to write temporary files to. Each task instance is provided with a separate temporary directory. There are no guarantees that the contents of this directory will be kept beyond the execution of the task.

Returns
File!

The directory. Never returns null. The directory will already exist.

getVariantName

Added in 4.2.0
Deprecated in 7.0.0
fun getVariantName(): String!

Returns the name of the variant.

Returns
String!

the name of the variant.

getWorkerExecutor

Added in 4.2.0
Deprecated in 7.0.0
fun getWorkerExecutor(): WorkerExecutor!

Returns the org.gradle.workers.WorkerExecutor to enlist runnable pieces of work.

Returns
WorkerExecutor!

a task level shared instance.