SingleArtifact

public sealed class SingleArtifact<T extends FileSystemLocation> extends Artifact.Single

Known direct subclasses
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.


Public Artifact for Android Gradle plugin.

These are Artifact.Single, see MultipleArtifact for multiple ones.

All methods in the Artifacts class should be supported with any subclass of this class.

Summary

Nested types

public static class SingleArtifact.AAR extends SingleArtifact implements Artifact.Transformable

The final AAR file as it would be published.

Directory where APK files will be located.

Universal APK that contains assets for all screen densities.

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

public static class SingleArtifact.BUNDLE extends SingleArtifact implements Artifact.Transformable

The final Bundle ready for consumption at Play Store.

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

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

The metadata for the library dependencies.

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

Protected constructors

<T extends FileSystemLocation> SingleArtifact(
    @NonNull ArtifactKind<@NonNull T> kind,
    @NonNull Artifact.Category category,
    String fileName
)

Inherited methods

From com.android.build.api.artifact.Artifact
final @NonNull Artifact.Category
@NonNull String
final @NonNull ArtifactKind<@NonNull T>
final @NonNull String

Provide a unique name for the artifact type.

Protected constructors

SingleArtifact

protected <T extends FileSystemLocation> SingleArtifact(
    @NonNull ArtifactKind<@NonNull T> kind,
    @NonNull Artifact.Category category,
    String fileName
)

Public methods

getFileSystemLocationName

public @NonNull String getFileSystemLocationName()
Returns
@NonNull String

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