com.android.build.api.variant

Interfaces

AarMetadata

Build-time properties for AAR Metadata inside a Component

Aidl

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

AndroidComponents
AndroidComponentsExtension

Generic extension for Android Gradle Plugin related components.

AndroidResources

Build-time properties for Android Resources inside a Component.

AndroidResourcesBuilder

Build-time properties for Android Resources inside a Component.

AndroidTest

Model for Android Test components that contains build-time properties

AndroidTestBuilder
AndroidVersion

A version of the Android platform.

AnnotationProcessor

Build-time properties for Java annotation processors inside a Component

ApkPackaging

Build-time properties for APK packaging inside a Component.

ApplicationAndroidComponentsExtension

Extension for the Android Application Gradle Plugin components.

ApplicationAndroidResources

Build-time properties for Android Resources inside a Component.

ApplicationAndroidResourcesBuilder

Build-time properties for Android Resources inside a Component.

ApplicationVariant

Model for application components that only contains build-time properties.

ApplicationVariantBuilder

Model for application components that only contains configuration-time properties that impacts the 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

Build-time properties for Component that can minify Android resources.

CanMinifyAndroidResourcesBuilder

Interface for component builder that can shrink resources

CanMinifyCode

Build-time properties for Component that can minify code.

CanMinifyCodeBuilder

Interface for component builder that can minify code

CodeTransparency
Component

Model for components that only contains build-time properties

ComponentBuilder

Model for components that only contains configuration-time properties that impacts the build flow.

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

DeviceTest

Model for Device Test components that contains build-time properties

DeviceTestBuilder

Interface to turn tests on devices, AndroidTest being an example of device tests.

DexPackagingOptions

Build-time properties for packaging dex files inside an APK Component.

Dexing

Settings related to how dex files are produced.

DslLifecycle
DynamicFeatureAndroidComponentsExtension

Extension for the Android Dynamic Feature Gradle Plugin components.

DynamicFeatureVariant

Model for dynamic feature components that only contains build-time properties.

DynamicFeatureVariantBuilder

Model for dynamic feature components that only contains configuration-time properties that impacts the build flow.

ExternalNativeBuild

Parameters to use when building native components.

ExternalNdkBuild

Interface for ndk-build per-variant info.

FilterConfiguration

Immutable filter configuration.

GeneratesAar

Build-time properties for Component that generate AARs.

GeneratesApk

Build-time properties for Component that produce APKs.

GeneratesApkBuilder

Configuration-time properties ComponentBuilder that produce APKs.

GeneratesTestApk

Build-time properties for Component that produce test APKs.

HasAndroidResources

Build-time properties for Component that have Android resources.

HasAndroidTest

Variant that optionally have AndroidTest component.

HasAndroidTestBuilder

Interface that marks the potential existence of AndroidTest component on a Variant.

HasDeviceTests

Variant that optionally have DeviceTest components like AndroidTest.

HasDeviceTestsBuilder

Interface that marks the potential existence of DeviceTest component on a Variant.

HasHostTests

Variant that optionally have HostTest components like UnitTest.

HasHostTestsBuilder

Interface that marks the potential existence of HostTest components on a Variant.

HasTestFixtures

Variant that optionally have TestFixtures component.

HasTestFixturesBuilder

Interface that marks the potential existence of TestFixtures component on a Variant.

HasUnitTest

Variant that optionally have UnitTest component.

HasUnitTestBuilder

Interface that marks the potential existence of UnitTest component on a Variant.

HostTest

Model for Host Test components that contains build-time properties.

HostTestBuilder

Interface to turn on or off host tests.

Instrumentation

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

JavaCompilation

Build-time properties for Java compile inside a Component

JniLibsApkPackaging

Build-time properties for packaging native libraries (.so) inside an APK Component.

JniLibsPackaging

Build-time properties for packaging native libraries (.so) inside a Component.

JniLibsTestedApkPackaging

Build-time properties for packaging native libraries (.so) inside a tested APK Component.

JniLibsTestedComponentPackaging

Build-time properties for packaging native libraries (.so) inside a tested Component.

KotlinMultiplatformAndroidComponentsExtension

Components extension for KMP Android Gradle Plugin related components.

KotlinMultiplatformAndroidVariant

Properties for the main Variant of a kotlin multiplatform android library

LibraryAndroidComponentsExtension

Extension for the Android Library Gradle Plugin components.

LibraryVariant

Model for library components that only contains build-time properties.

LibraryVariantBuilder

Model for library components that only contains configuration-time properties that impacts the build flow.

LifecycleTasks

Lifecycle tasks created by the AGP plugins.

LintLifecycleExtension
ManifestFiles

Defines a set of manifests for particular variant.

Packaging

Build-time properties for common packaging inside a Component.

Renderscript

Build-time properties for renderscript inside a Component.

ResValue.Key

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

ResourcesPackaging

Build-time properties for packaging Java resources inside a Component.

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

Model for test components that contains build-time properties.

TestFixtures

Model for Test Fixtures components that contains build-time properties

TestVariant

Model for test components that only contains build-time properties.

TestVariantBuilder

Model for test components that only contains configuration-time properties that impacts the build flow.

TestedApkPackaging

Build-time properties for packaging inside a tested APK Component.

TestedComponentPackaging

Build-time properties for packaging inside a tested Component.

UnitTest

Component for unit tests

Variant

Model for variant components that only contains build-time properties

VariantBuilder

Model for variant components that only contains configuration-time properties that impacts the build flow.

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

Configuration for a given build output.

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.

Exceptions

PropertyAccessNotAllowedException

Exception thrown when users are trying to access VariantBuilder properties.

Enums

FilterConfiguration.FilterType

Split dimension type

ScopedArtifacts.Scope

Defines possible scopes.

VariantOutputConfiguration.OutputType

The type of an output.