# Artifact

[View Source](https://cs.android.com/search?q=file:com/android/build/api/artifact/Artifact.kt+class:com.android.build.api.artifact.Artifact) Added in 4.2.0


```
abstract class Artifact<T : FileSystemLocation> : Serializable
```

<br />

Known direct subclasses [Artifact.Multiple](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Multiple), [Artifact.Single](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Single)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Multiple` | Denotes possible multiple `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` instances for this artifact type. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Single` | Denotes a single `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` instance of this artifact type at a given time. |

Known indirect subclasses [MultipleArtifact.MULTIDEX_KEEP_PROGUARD](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.MULTIDEX_KEEP_PROGUARD), [MultipleArtifact.NATIVE_DEBUG_METADATA](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.NATIVE_DEBUG_METADATA), [MultipleArtifact.NATIVE_SYMBOL_TABLES](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.NATIVE_SYMBOL_TABLES), [MultipleArtifact.PRE_COMPILATION_CLASSES](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.PRE_COMPILATION_CLASSES), [MultipleArtifact](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact), [ScopedArtifact.CLASSES](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.CLASSES), [ScopedArtifact.JAVA_RES](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.JAVA_RES), [ScopedArtifact.POST_COMPILATION_CLASSES](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.POST_COMPILATION_CLASSES), [ScopedArtifact](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact), [SingleArtifact.AAR](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AAR), [SingleArtifact.AGGREGATED_LINT_HTML_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_HTML_REPORT), [SingleArtifact.AGGREGATED_LINT_SARIF_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_SARIF_REPORT), [SingleArtifact.AGGREGATED_LINT_TEXT_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_TEXT_REPORT), [SingleArtifact.AGGREGATED_LINT_XML_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_XML_REPORT), [SingleArtifact.APK_FROM_BUNDLE](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.APK_FROM_BUNDLE), [SingleArtifact.APK](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.APK), [SingleArtifact.ASSETS](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.ASSETS), [SingleArtifact.BUNDLE](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.BUNDLE), [SingleArtifact.LINT_HTML_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_HTML_REPORT), [SingleArtifact.LINT_SARIF_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_SARIF_REPORT), [SingleArtifact.LINT_TEXT_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_TEXT_REPORT), [SingleArtifact.LINT_XML_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_XML_REPORT), [SingleArtifact.MERGED_MANIFEST](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.MERGED_MANIFEST), [SingleArtifact.MERGED_NATIVE_LIBS](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.MERGED_NATIVE_LIBS), [SingleArtifact.METADATA_LIBRARY_DEPENDENCIES_REPORT](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.METADATA_LIBRARY_DEPENDENCIES_REPORT), [SingleArtifact.OBFUSCATION_MAPPING_FILE](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.OBFUSCATION_MAPPING_FILE), [SingleArtifact.OBFUSCATION_MAPPING_PARTITION_FILE](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.OBFUSCATION_MAPPING_PARTITION_FILE), [SingleArtifact.PUBLIC_ANDROID_RESOURCES_LIST](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.PUBLIC_ANDROID_RESOURCES_LIST), [SingleArtifact.RUNTIME_SYMBOL_LIST](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.RUNTIME_SYMBOL_LIST), [SingleArtifact.VERSION_CONTROL_INFO_FILE](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.VERSION_CONTROL_INFO_FILE), [SingleArtifact](https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.MULTIDEX_KEEP_PROGUARD` | Text files with additional ProGuard rules to be used to determine which classes are compiled into the main dex file. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.NATIVE_DEBUG_METADATA` | Directories with native debug metadata |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.NATIVE_SYMBOL_TABLES` | Directories with debug symbol table |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact.PRE_COMPILATION_CLASSES` | Directories containing generated code that will be added to compile classpath for the module. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/MultipleArtifact` | Public `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact` for Android Gradle plugin. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.CLASSES` | .class files, result of sources compilation and/or external dependencies depending on the scope; includes users' transformation, but does not include Jacoco instrumentation |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.JAVA_RES` |   |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact.POST_COMPILATION_CLASSES` | .class files, result of sources compilation and/or external dependencies depending on the scope |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ScopedArtifact` | List of ScopedArtifacts.Scope artifacts. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AAR` | The final AAR file as it would be published. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_HTML_REPORT` | The aggregated HTML lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_SARIF_REPORT` | The aggregated SARIF lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_TEXT_REPORT` | The aggregated text lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.AGGREGATED_LINT_XML_REPORT` | The aggregated XML lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.APK_FROM_BUNDLE` | Universal APK that contains assets for all screen densities. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.APK` | Directory where APK files will be located. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.ASSETS` | Assets that will be packaged in the resulting AAR, APK or Bundle. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.BUNDLE` | The final Bundle ready for consumption at Play Store. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_HTML_REPORT` | The HTML lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_SARIF_REPORT` | The SARIF lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_TEXT_REPORT` | The text lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.LINT_XML_REPORT` | The XML lint report file |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.MERGED_MANIFEST` | Merged manifest file that will be used in the APK, Bundle and InstantApp packages. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.MERGED_NATIVE_LIBS` | The directory containing all the native library (.so) files that will be packaged in the APK, AAR, or Bundle. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.METADATA_LIBRARY_DEPENDENCIES_REPORT` | The metadata for the library dependencies. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.OBFUSCATION_MAPPING_FILE` |   |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.OBFUSCATION_MAPPING_PARTITION_FILE` |   |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.PUBLIC_ANDROID_RESOURCES_LIST` | A file containing the list of public resources exported by a library project. |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.RUNTIME_SYMBOL_LIST` | The text symbol output file (R.txt) containing a list of resources and their ids (including of transitive dependencies). |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact.VERSION_CONTROL_INFO_FILE` | Points to the Version control information when VCS tagging is enabled (which is by default in release builds) |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/SingleArtifact` | Public `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact` for Android Gradle plugin. |

*** ** * ** ***

Defines a type of artifact handled by the Android Gradle Plugin.

Each instance of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact` is produced by a `https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html` and potentially consumed by any number of tasks.

An artifact can potentially be produced by more than one task (each task acting in an additive behavior), but consumers must be aware when more than one artifact can be present, implementing the `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Multiple` interface will indicate such requirement.

An artifact must be one of the supported `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind` and must be provided when the constructor is called. ArtifactKind also defines the specific `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` subclass used.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Appendable` Denotes an artifact type that can be appended to. |
| `enum https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Category : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Category>` Defines the kind of artifact type. this will be used to determine the output file location for instance. |
| `interface https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.ContainsMany` Denotes a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#DIRECTORY()` that may contain zero to many `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/BuiltArtifact`. |
| `abstract class https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Multiple<FileTypeT : https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html> : https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact<FileTypeT>` Denotes possible multiple `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` instances for this artifact type. |
| `interface https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Replaceable` Denotes an artifact type that can be replaced. |
| `abstract class https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Single<FileTypeT : https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html> : https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact<FileTypeT>` Denotes a single `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` instance of this artifact type at a given time. |
| `interface https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Transformable` Denotes an artifact type that can be transformed. |
| `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html interface https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.WithQualifiers` Denotes a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Multiple` artifact that can have qualifiers attached to each of its `https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html` instances. |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind.DIRECTORY` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#DIRECTORY()` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind` for `https://docs.gradle.org/current/javadoc/org/gradle/api/file/Directory.html` |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind.FILE` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#FILE()` `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind` for `https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html` |

| ### Public constructors |
|---|
| `<T : https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileSystemLocation.html> https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#Artifact(com.android.build.api.artifact.ArtifactKind,com.android.build.api.artifact.Artifact.Category)( kind: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind<T>, category: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Category )` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#getFileSystemLocationName()()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#getFolderName()()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#name()()` Provide a unique name for the artifact type. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact.Category` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#category()` |
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind<T>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact#kind()` |

## Public companion properties

### DIRECTORY

```
val DIRECTORY: ArtifactKind.DIRECTORY
```

`https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind` for `https://docs.gradle.org/current/javadoc/org/gradle/api/file/Directory.html`

### FILE

```
val FILE: ArtifactKind.FILE
```

`https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/ArtifactKind` for `https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html`

## Public constructors

### Artifact

```
<T : FileSystemLocation> Artifact(
    kind: ArtifactKind<T>,
    category: Artifact.Category
)
```

## Public functions

### getFileSystemLocationName

Added in 4.2.0

```
open fun getFileSystemLocationName(): String
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | Depending on `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/artifact/Artifact`, returns the file name of the folder under the variant-specific folder or an empty string to use defaults. |

### getFolderName

Added in 4.2.0

```
open fun getFolderName(): String
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The folder name under which the artifact files or folders should be stored. |

### name

Added in 4.2.0

```
fun name(): String
```

Provide a unique name for the artifact type. For external plugins defining new types, consider adding the plugin name to the artifact's name to avoid collision with other plugins.

## Public properties

### category

Added in 4.2.0

```
val category: Artifact.Category
```

### kind

Added in 4.2.0

```
val kind: ArtifactKind<T>
```