Returns the location of content for a given set of Scopes, Content Types, and Format.
If the format is DIRECTORY then the result is the file location of the directory. If the format is JAR then the result is a file representing the jar to create.
Non of the directories or files are created by querying this method, and there is no checks regarding the existence of content in this location.
In case of incremental processing of removed files, it is safe to query the method to get the location of the files to removed.
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,["# TransformOutputProvider\n=======================\n\n\n```\ninterface TransformOutputProvider\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n| **This interface is deprecated.** \n\nThe output of a transform.\n\nThere is no direct access to a location to write. Instead, Transforms can ask to get the location for given scopes, content-types and a format.\n\nSummary\n-------\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [deleteAll](/reference/tools/gradle-api/8.0/com/android/build/api/transform/TransformOutputProvider#deleteAll())`()` Delete all content. |\n| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`!` | [getContentLocation](/reference/tools/gradle-api/8.0/com/android/build/api/transform/TransformOutputProvider#getContentLocation(java.lang.String,java.util.Set\u003ccom.android.build.api.transform.QualifiedContent.ContentType\u003e,java.util.Set\u003c? super com.android.build.api.transform.QualifiedContent.Scope\u003e,com.android.build.api.transform.Format))`(` ` name: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!,` ` types: (`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[QualifiedContent.ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType)`!\u003e!,` ` scopes: (`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!\u003e!,` ` format: `[Format](/reference/tools/gradle-api/8.0/com/android/build/api/transform/Format)`!` `)` **This function is deprecated.** |\n\nPublic functions\n----------------\n\n### deleteAll\n\n```\nfun deleteAll(): Unit\n```\n\nDelete all content. This is useful when running in non-incremental mode \n\n| Throws ||\n|-------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|\n| `java.io.IOException: `[java.io.IOException](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/IOException.html) | if deleting the output failed. |\n\n### getContentLocation\n\n```\nfun getContentLocation(\n name: String!,\n types: (Mutable)Set\u003cQualifiedContent.ContentType!\u003e!,\n scopes: (Mutable)Set\u003cAny!\u003e!,\n format: Format!\n): File!\n```\n| **This function is deprecated.** \n\nReturns the location of content for a given set of Scopes, Content Types, and Format.\n\nIf the format is [DIRECTORY](/reference/tools/gradle-api/8.0/com/android/build/api/transform/Format#DIRECTORY) then the result is the file location of the directory. If the format is [JAR](/reference/tools/gradle-api/8.0/com/android/build/api/transform/Format#JAR) then the result is a file representing the jar to create.\n\nNon of the directories or files are created by querying this method, and there is no checks regarding the existence of content in this location.\n\nIn case of incremental processing of removed files, it is safe to query the method to get the location of the files to removed. \n\n| Parameters ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| `name: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` | a unique name for the content. For a given set of scopes/types/format it must be unique. |\n| `types: (`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[QualifiedContent.ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType)`!\u003e!` | the content types associated with this content. |\n| `scopes: (`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!\u003e!` | the scopes associated with this content. |\n| `format: `[Format](/reference/tools/gradle-api/8.0/com/android/build/api/transform/Format)`!` | the format of the content. |\n\n| Returns ||\n|-------------------------------------------------------------------------------------------|------------------------------|\n| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`!` | the location of the content. |"]]