Stay organized with collections
Save and categorize content based on your preferences.
ScopedArtifacts
interface ScopedArtifacts
Scoped artifacts are artifacts that can be made available in the current variant scope, or may be optionally include the project's dependencies in the results.
This is only available for elements that are part of the com.android.build.api.artifact.ScopedArtifact
hierarchy.
Summary
Public functions
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ScopedArtifacts\n===============\n\n\n```\ninterface ScopedArtifacts\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nScoped artifacts are artifacts that can be made available in the current variant scope, or may be optionally include the project's dependencies in the results.\n\nThis is only available for elements that are part of the [com.android.build.api.artifact.ScopedArtifact](/reference/tools/gradle-api/8.0/com/android/build/api/artifact/ScopedArtifact) hierarchy.\n\nSummary\n-------\n\n| ### Nested types ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------|\n| [ScopedArtifacts.Scope](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ScopedArtifacts.Scope) | Defines possible scopes. |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ScopedArtifactsOperation](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ScopedArtifactsOperation)`\u003cT\u003e` | `\u003cT : `[Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html)`\u003e `[use](/reference/tools/gradle-api/8.0/com/android/build/api/variant/ScopedArtifacts#use(org.gradle.api.tasks.TaskProvider))`(taskProvider: `[TaskProvider](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/TaskProvider.html)`\u003cT\u003e)` Access [Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html) based operations. |\n\nPublic functions\n----------------\n\n### use\n\n```\nfun \u003cT : Task\u003e use(taskProvider: TaskProvider\u003cT\u003e): ScopedArtifactsOperation\u003cT\u003e\n```\n\nAccess [Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html) based operations.\n\nSo far, all operations are only accessible providing a [Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html) instance."]]