Artifact

abstract class Artifact<T : FileSystemLocation> : Serializable
Known direct subclasses
Artifact.Multiple

Denotes possible multiple FileSystemLocation instances for this artifact type.

Artifact.Single

Denotes a single FileSystemLocation instance of this artifact type at a given time.

Known indirect subclasses
MultipleArtifact.MULTIDEX_KEEP_PROGUARD

Text files with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.

MultipleArtifact.NATIVE_DEBUG_METADATA

Directories with native debug metadata

MultipleArtifact.NATIVE_SYMBOL_TABLES

Directories with debug symbol table

MultipleArtifact

Public Artifact for Android Gradle plugin.

ScopedArtifact.CLASSES

.class files, result of sources compilation and/or external dependencies depending on the scope

ScopedArtifact.JAVA_RES
ScopedArtifact

List of ScopedArtifacts.Scope artifacts.

SingleArtifact.AAR

The final AAR file as it would be published.

SingleArtifact.APK_FROM_BUNDLE

Universal APK that contains assets for all screen densities.

SingleArtifact.APK

Directory where APK files will be located.

SingleArtifact.ASSETS

Assets that will be packaged in the resulting APK or Bundle.

SingleArtifact.BUNDLE

The final Bundle ready for consumption at Play Store.

SingleArtifact.MERGED_MANIFEST

Merged manifest file that will be used in the APK, Bundle and InstantApp packages.

SingleArtifact.MERGED_NATIVE_LIBS

The directory containing all the native library (.so) files that will be packaged in the APK, AAR, or Bundle.

SingleArtifact.METADATA_LIBRARY_DEPENDENCIES_REPORT

The metadata for the library dependencies.

SingleArtifact.OBFUSCATION_MAPPING_FILE
SingleArtifact.PUBLIC_ANDROID_RESOURCES_LIST

A file containing the list of public resources exported by a library project.

SingleArtifact

Public Artifact for Android Gradle plugin.


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

Each instance of Artifact is produced by a org.gradle.api.Task 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 Multiple interface will indicate such requirement.

An artifact must be one of the supported ArtifactKind and must be provided when the constructor is called. ArtifactKind also defines the specific FileSystemLocation subclass used.

Summary

Nested types

Artifact.Appendable

Denotes an artifact type that can be appended to.

Artifact.Category

Defines the kind of artifact type. this will be used to determine the output file location for instance.

Artifact.ContainsMany

Denotes a single DIRECTORY that may contain zero to many com.android.build.api.variant.BuiltArtifact.

Artifact.Multiple

Denotes possible multiple FileSystemLocation instances for this artifact type.

Artifact.Replaceable

Denotes an artifact type that can be replaced.

Artifact.Single

Denotes a single FileSystemLocation instance of this artifact type at a given time.

Artifact.Transformable

Denotes an artifact type that can transformed.

Public constructors

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

Public functions

open String
open String
String

Provide a unique name for the artifact type.

Public companion properties

Public constructors

Artifact

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

Public functions

getFileSystemLocationName

open fun getFileSystemLocationName(): String
Returns
String

Depending on T, returns the file name of the folder under the variant-specific folder or an empty string to use defaults.

getFolderName

open fun getFolderName(): String
Returns
String

The folder name under which the artifact files or folders should be stored.

name

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

val categoryArtifact.Category

kind

val kindArtifactKind<T>