com.android.build.api.variant

Interfaces

AarMetadata

Variant object for configuring AAR metadata.

Aidl

Provides structured access to various AIDL tools such as the aidl compiler executable and aidl framework.

AndroidComponentsExtension

Generic extension for Android Gradle Plugin related components.

AndroidResources

Defines a variant's aapt options.

AndroidTest

Properties for the android test Variant of a module.

AndroidVersion
AnnotationProcessor
ApkPackaging

Defines an APK variant's packaging options.

ApplicationAndroidComponentsExtension

Extension for the Android Application Gradle Plugin components.

ApplicationVariant

Properties for the main Variant of an application.

ApplicationVariantBuilder

Application specific variant object that contains properties that will determine the variant's build flow.

BuiltArtifact

Represents a built artifact that is present in the file system.

BuiltArtifacts

Represents a Collection of BuiltArtifact produced by a org.gradle.api.Task.

BuiltArtifacts.TransformParams

Specialized version of Gradle's WorkParameters so we can retrieve the output file generated when transforming an instance of BuiltArtifacts into a new one.

BuiltArtifactsLoader

Facility to load BuiltArtifacts instances from metadata files in the file system.

BundleConfig

Information related to the actions creating a bundle (.aab) file for the variant.

CanMinifyAndroidResources

Interface for component that can shrink resources

CanMinifyAndroidResourcesBuilder

Interface for component builder that can shrink resources

CanMinifyCode

Interface for component that can minify code

CanMinifyCodeBuilder

Interface for component builder that can minify code

CodeTransparency
Component
ComponentBuilder

Component object that contains properties that must be set during configuration time as it changes the build flow for the variant.

ComponentIdentity

Variant Configuration represents the identify of a variant

DependenciesInfo

Read-only object to access dependencies information properties during com.android.build.api.variant.AndroidComponentsExtension#onVariants

DependenciesInfoBuilder

Interface for component builder that specifies whether to include SDK dependency information in APKs and Bundles for the variant

DexPackagingOptions

Defines an APK variant's packaging options for dex files.

DslLifecycle
DynamicFeatureAndroidComponentsExtension

Extension for the Android Dynamic Feature Gradle Plugin components.

DynamicFeatureVariant
DynamicFeatureVariantBuilder
ExternalNativeBuild

Parameters to use when building native components.

ExternalNdkBuild

Interface for ndk-build per-variant info.

FilterConfiguration

Immutable filter configuration.

GeneratesAar
GeneratesApk

Cross cutting interface for Component subtypes that are producing APK files.

GeneratesApkBuilder

Cross-cutting interface for components builders that produce APK files.

GeneratesTestApk
HasAndroidResources
HasAndroidTest

Variants that optionally have instrumented tests.

HasAndroidTestBuilder

Interface that mark the potential existence of android tests associated with a variant.

HasTestFixtures

Variants that optionally have test fixtures.

HasTestFixturesBuilder

Interface that mark the potential existence of test fixtures associated with a variant.

HasUnitTest

Variants that optionally have unit test component

HasUnitTestBuilder

Interface that mark the potential existence of unit tests associated with a variant.

Instrumentation

Options to register asm class visitors and to configure the instrumentation process.

JavaCompilation
JniLibsApkPackaging

Defines an APK variant's packaging options for native library (.so) files.

JniLibsPackaging

Defines a variant's packaging options for native library (.so) files.

LibraryAndroidComponentsExtension

Extension for the Android Library Gradle Plugin components.

LibraryVariant

Variant for Library projects

LibraryVariantBuilder

VariantBuilder type for library projects

LintLifecycleExtension
Packaging

Defines a variant's packaging options.

Renderscript
ResValue.Key

a generated resource is identified by its type+name as you can create

ResourcesPackaging
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.

ScopedArtifactsOperation

Defines all possible operations on a ScopedArtifact artifact type.

SigningConfig

Defines a variant's signing config.

SourceDirectories

Defines all common behaviors to sources access in AGP.

SourceDirectories.Flat

Represents all the source folders for a source type in the variant.

SourceDirectories.Layered

Represent a collection of directories that have overlay properties to each other.

Sources

Provides access to all source directories for a Variant.

TestAndroidComponentsExtension

Extension for the Android Test Gradle Plugin components.

TestComponent
TestFixtures
TestVariant

Variant for test-only modules.

TestVariantBuilder

VariantBuilder type for tests associated with a module.

UnitTest
Variant

Parent interface for all types of variants.

VariantBuilder

Variant object that contains properties that must be set during configuration time as it changes the build flow for the variant.

VariantExtension

Marker type for Variant extension objects.

VariantExtensionConfig

Configuration object passed to the lambda responsible for creating a com.android.build.api.variant.VariantExtension for each com.android.build.api.variant.Variant instance.

VariantFilter

This interface is deprecated. Use AndroidComponentsExtension.beforeVariants API to disable specific variants

VariantInfo

This interface is deprecated.

VariantOutput

Defines a variant output.

VariantOutputConfiguration
VariantSelector

Selector to reduce the number of variants that are of interests when calling any of the variant API like AndroidComponentsExtension.beforeVariants.

Classes

BuildConfigField

Field definition for the generated BuildConfig class.

DslExtension

Third party DSL extension configuration.

DslExtension.Builder

Creates a Builder to instance to create a DslExtension containing all desired extension points to the Android Gradle Plugin DSL.

ResValue

Resource to be generated by the build system.

Enums

FilterConfiguration.FilterType

Split dimension type

ScopedArtifacts.Scope

Defines possible scopes.

VariantOutputConfiguration.OutputType

Type of package file, either the main APK or a full split APK file containing resources for a particular split dimension.