# Context

# Context

<br />

```
public interface Context
```

<br />

*** ** * ** ***

| **This interface is deprecated.**   

Context for the transform.

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

## Summary

|                                               ### Public methods                                                |
|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[LoggingManager](https://docs.gradle.org/current/javadoc/org/gradle/api/logging/LoggingManager.html) | [getLogging](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getLogging())`()` Returns the LoggingManager which can be used to control the logging level and standard output/error capture for this task.                                                     |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)         | [getPath](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getPath())`()` Returns the path of the task, which is a fully qualified name for the task.                                                                                                          |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)         | [getProjectName](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getProjectName())`()` Returns the project name containing the task.                                                                                                                          |
| `abstract `[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)               | [getTemporaryDir](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getTemporaryDir())`()` Returns a directory which this task can use to write temporary files to.                                                                                             |
| `abstract `[String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html)         | [getVariantName](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getVariantName())`()` Returns the name of the variant.                                                                                                                                       |
| `abstract `[WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html)     | [getWorkerExecutor](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/transform/Context#getWorkerExecutor())`()` Returns the[org.gradle.workers.WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html)to enlist runnable pieces of work. |

## Public methods

### getLogging

```
abstract LoggingManager getLogging()
```

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](https://docs.gradle.org/current/javadoc/org/gradle/api/logging/LoggingManager.html) | the LoggingManager. Never returns null. |

### getPath

```
abstract String getPath()
```

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](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html) | the path of the task, which is equal to the path of the project plus the name of the task. |

### getProjectName

```
abstract String getProjectName()
```

Returns the project name containing the task.  

|                                           Returns                                            |
|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| [String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html) | the[getName](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getName--) |

### getTemporaryDir

```
abstract File getTemporaryDir()
```

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](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html) | The directory. Never returns null. The directory will already exist. |

### getVariantName

```
abstract String getVariantName()
```

Returns the name of the variant.  

|                                           Returns                                            |
|----------------------------------------------------------------------------------------------|--------------------------|
| [String](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html) | the name of the variant. |

### getWorkerExecutor

```
abstract WorkerExecutor getWorkerExecutor()
```

Returns the[org.gradle.workers.WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html)to enlist runnable pieces of work.  

|                                             Returns                                              |
|--------------------------------------------------------------------------------------------------|-------------------------------|
| [WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html) | a task level shared instance. |