com.android.build.api.transform
Interface Context


@Beta
public interface Context

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

This API is non final and is subject to change. We are looking for feedback, and will attempt to stabilize it in the 1.6 time frame.


Method Summary
 LoggingManager getLogging()
          Returns the LoggingManager which can be used to control the logging level and standard output/error capture for this task.
 String getPath()
          Returns the path of the task, which is a fully qualified name for the task.
 File getTemporaryDir()
          Returns a directory which this task can use to write temporary files to.
 

Method Detail

getLogging

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:
the LoggingManager. Never returns null.

getTemporaryDir

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:
The directory. Never returns null. The directory will already exist.

getPath

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:
the path of the task, which is equal to the path of the project plus the name of the task.