Stay organized with collections
Save and categorize content based on your preferences.
interface TransformInvocation
An invocation object used to pass of pertinent information for a Transform#transform(TransformInvocation)
call.
Summary
Public methods
getContext
@NonNull abstract fun getContext(): Context
Returns the context in which the transform is run.
Return |
Context: the context in which the transform is run. |
getOutputProvider
@Nullable abstract fun getOutputProvider(): TransformOutputProvider?
Returns the output provider allowing to create content.
@NonNull abstract fun getReferencedInputs(): MutableCollection<TransformInput!>
Returns the referenced-only inputs which are not consumed by this transformation.
@NonNull abstract fun getSecondaryInputs(): MutableCollection<SecondaryInput!>
Returns the list of secondary file changes since last. Only secondary files that this transform can handle incrementally will be part of this change set.
isIncremental
abstract fun isIncremental(): Boolean
Indicates whether the transform execution is incremental.
Return |
Boolean: true for an incremental invocation, false otherwise. |
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,["# TransformInvocation\n===================\n\n```\ninterface TransformInvocation\n```\n\n|----------------------------------------------------------|\n| [com.android.build.api.transform.TransformInvocation](#) |\n\nAn invocation object used to pass of pertinent information for a [Transform#transform(TransformInvocation)](/reference/tools/gradle-api/4.2/com/android/build/api/transform/Transform#transform(com.android.build.api.transform.TransformInvocation)) call.\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Context](/reference/tools/gradle-api/4.2/com/android/build/api/transform/Context) | [getContext](#getContext())`()` Returns the context in which the transform is run. |\n| abstract [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[TransformInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformInput)!\\\u003e | [getInputs](#getInputs())`()` Returns the inputs/outputs of the transform. |\n| abstract [TransformOutputProvider](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformOutputProvider)? | [getOutputProvider](#getOutputProvider())`()` Returns the output provider allowing to create content. |\n| abstract [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[TransformInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformInput)!\\\u003e | [getReferencedInputs](#getReferencedInputs())`()` Returns the referenced-only inputs which are not consumed by this transformation. |\n| abstract [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[SecondaryInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/SecondaryInput)!\\\u003e | [getSecondaryInputs](#getSecondaryInputs())`()` Returns the list of secondary file changes since last. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isIncremental](#isIncremental())`()` Indicates whether the transform execution is incremental. |\n\nPublic methods\n--------------\n\n### getContext\n\n```\n@NonNull abstract fun getContext(): Context\n```\n\nReturns the context in which the transform is run.\n\n| Return ||\n|---|---|\n| [Context](/reference/tools/gradle-api/4.2/com/android/build/api/transform/Context): the context in which the transform is run. ||\n\n### getInputs\n\n```\n@NonNull abstract fun getInputs(): MutableCollection\u003cTransformInput!\u003e\n```\n\nReturns the inputs/outputs of the transform.\n\n| Return ||\n|---|---|\n| [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[TransformInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformInput)!\\\u003e: the inputs/outputs of the transform. ||\n\n### getOutputProvider\n\n```\n@Nullable abstract fun getOutputProvider(): TransformOutputProvider?\n```\n\nReturns the output provider allowing to create content.\n\n| Return ||\n|---|---|\n| [TransformOutputProvider](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformOutputProvider)?: he output provider allowing to create content. ||\n\n### getReferencedInputs\n\n```\n@NonNull abstract fun getReferencedInputs(): MutableCollection\u003cTransformInput!\u003e\n```\n\nReturns the referenced-only inputs which are not consumed by this transformation.\n\n| Return ||\n|---|---|\n| [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[TransformInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/TransformInput)!\\\u003e: the referenced-only inputs. ||\n\n### getSecondaryInputs\n\n```\n@NonNull abstract fun getSecondaryInputs(): MutableCollection\u003cSecondaryInput!\u003e\n```\n\nReturns the list of secondary file changes since last. Only secondary files that this transform can handle incrementally will be part of this change set.\n\n| Return ||\n|---|---|\n| [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[SecondaryInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/SecondaryInput)!\\\u003e: the list of changes impacting a [SecondaryInput](/reference/tools/gradle-api/4.2/com/android/build/api/transform/SecondaryInput) ||\n\n### isIncremental\n\n```\nabstract fun isIncremental(): Boolean\n```\n\nIndicates whether the transform execution is incremental.\n\n| Return ||\n|---|---|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): true for an incremental invocation, false otherwise. ||"]]