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 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 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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Context\n=======\n\n\n```\ninterface Context\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n| **This interface is deprecated.** \n\nContext for the transform.\n\nThis gives access to a limited amount of context when the transform is run.\n\nSummary\n-------\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [LoggingManager](https://docs.gradle.org/current/javadoc/org/gradle/api/logging/LoggingManager.html)`?` | [getLogging](/reference/tools/gradle-api/7.2/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. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [getPath](/reference/tools/gradle-api/7.2/com/android/build/api/transform/Context#getPath())`()` Returns the path of the task, which is a fully qualified name for the task. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [getProjectName](/reference/tools/gradle-api/7.2/com/android/build/api/transform/Context#getProjectName())`()` Returns the project name containing the task. |\n| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`?` | [getTemporaryDir](/reference/tools/gradle-api/7.2/com/android/build/api/transform/Context#getTemporaryDir())`()` Returns a directory which this task can use to write temporary files to. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getVariantName](/reference/tools/gradle-api/7.2/com/android/build/api/transform/Context#getVariantName())`()` Returns the name of the variant. |\n| [WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html) | [getWorkerExecutor](/reference/tools/gradle-api/7.2/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. |\n\nPublic functions\n----------------\n\n### getLogging\n\n```\nfun getLogging(): LoggingManager?\n```\n\nReturns 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. \n\n| Returns ||\n|---------------------------------------------------------------------------------------------------------|-----------------------------------------|\n| [LoggingManager](https://docs.gradle.org/current/javadoc/org/gradle/api/logging/LoggingManager.html)`?` | the LoggingManager. Never returns null. |\n\n### getPath\n\n```\nfun getPath(): String?\n```\n\nReturns 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 `:`. \n\n| Returns ||\n|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | the path of the task, which is equal to the path of the project plus the name of the task. |\n\n### getProjectName\n\n```\nfun getProjectName(): String?\n```\n\nReturns the project name containing the task. \n\n| Returns ||\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | the [getName](https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getName--) |\n\n### getTemporaryDir\n\n```\nfun getTemporaryDir(): File?\n```\n\nReturns 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. \n\n| Returns ||\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| [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. |\n\n### getVariantName\n\n```\nfun getVariantName(): String\n```\n\nReturns the name of the variant. \n\n| Returns ||\n|----------------------------------------------------------------------------------|--------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the name of the variant. |\n\n### getWorkerExecutor\n\n```\nfun getWorkerExecutor(): WorkerExecutor\n```\n\nReturns the [org.gradle.workers.WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html) to enlist runnable pieces of work. \n\n| Returns ||\n|--------------------------------------------------------------------------------------------------|-------------------------------|\n| [WorkerExecutor](https://docs.gradle.org/current/javadoc/org/gradle/workers/WorkerExecutor.html) | a task level shared instance. |"]]