com.android.build.api.dsl

Interfaces

AaptOptions

This interface is deprecated. Renamed to AndroidResources

AarMetadata

DSL object for configuring metadata that is embedded in the AAR.

AbiSplit

DSL object for configuring per-abi splits options.

AdbOptions

This interface is deprecated. Renamed to Installation

AndroidResources

DSL object for configuring aapt options.

AndroidSourceDirectorySet

An AndroidSourceDirectorySet represents a set of directory inputs for an Android project.

AndroidSourceFile

An AndroidSourceFile represents a single file input for an Android project.

AndroidSourceSet

An AndroidSourceSet represents a logical group of Java, aidl and RenderScript sources as well as Android and non-Android (Java-style) resources.

AnnotationProcessorOptions

Options for configuring Java annotation processor.

ApkExtension

Common extension properties for the Android Gradle Plugin Application and Dynamic Feature plugins.

ApkSigningConfig

DSL object to configure signing configs.

ApplicationAndroidResources
ApplicationBaseFlavor
ApplicationBuildFeatures

A list of build features that can be disabled or enabled in an Android Application project.

ApplicationBuildType

Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.

ApplicationDefaultConfig

Specifies defaults for properties that the Android application plugin applies to all build variants.

ApplicationExtension

Extension for the Android Gradle Plugin Application plugin.

ApplicationProductFlavor

Encapsulates all product flavors properties for application projects.

ApplicationPublishing

Maven publishing DSL object for configuring options related to publishing APK and AAB.

ApplicationSingleVariant

Single variant publishing options for application projects.

ApplicationVariantDimension

Shared properties between DSL objects that contribute to an application variant.

AssetPackBundleExtension
AssetPackExtension

Extension properties for the Asset Pack plugin.

BaseFlavor

Shared properties between DSL objects ProductFlavor and DefaultConfig

BaselineProfile

DSL object in Optimization for configuring properties related to Baseline Profiles.

BuildFeatures

A list of build features that can be disabled or enabled in an Android project.

BuildType

Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.

Bundle

Features that apply to distribution by the bundle

BundleAbi
BundleCodeTransparency
BundleCountrySet
BundleDensity
BundleDeviceTier
BundleLanguage
BundleStoreArchive
BundleTexture
Cmake

DSL object for per-module CMake configurations, such as the path to your CMakeLists.txt build script and external native build output directory.

CmakeFlags

DSL object for per-variant CMake options, such as CMake arguments and compiler flags.

CommonExtension

Common extension properties for the Android Application.

CompileOptions

Java compilation options.

ComposeOptions

Optional settings for the Compose feature.

ConfigurableFiles

A container for a collection of files that has the capability to add a single existing file or a group of existing files to the collection

ConsumerKeepRules
DataBinding

DSL object for configuring databinding options.

DefaultConfig

Specifies defaults for variant properties that the Android plugin applies to all build variants.

DensitySplit

This interface is deprecated. Density-based apk split feature is deprecated and will be removed in AGP 9.0.Use Android App Bundle (https://developer.android.com/guide/app-bundle)to generate optimized APKs.

DependenciesInfo

DSL object to specify whether to include SDK dependency information in APKs and Bundles.

DependencyVariantSelection

Specifies options for doing variant selection for external Android dependencies based on build types and product flavours

Device

Top-level interface for all devices to run applications by tasks in the Android Gradle Plugin.

DeviceGroup

A group of devices to be run with tests using the Unified Test Platform.

DexPackaging

Packaging options for Dex (Android Dalvik Executable) files

DynamicDelivery

DSL object to configure dynamic delivery of an asset pack.

DynamicFeatureAndroidResources
DynamicFeatureBaseFlavor

Shared properties between DSL objects ProductFlavor and DefaultConfig for dynamic features.

DynamicFeatureBuildFeatures

A list of build features that can be disabled or enabled in an Android Dynamic Feature project.

DynamicFeatureBuildType

Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.

DynamicFeatureDefaultConfig

Specifies defaults for properties that the Android dynamic-feature plugin applies to all build variants.

DynamicFeatureExtension

Extension for the Android Dynamic Feature Gradle Plugin.

DynamicFeatureProductFlavor

Encapsulates all product flavors properties for dynamic feature projects.

DynamicFeatureVariantDimension

Shared properties between DSL objects that contribute to an dynamic feature variant.

EmulatorControl

Options for configuring Android Emulator Access

EmulatorSnapshots

Options for configuring Android Test Retention.

Execution
ExecutionProfile
ExternalNativeBuild

DSL object to configure external native builds using CMake or ndk-build

ExternalNativeBuildFlags

DSL object for per-variant CMake and ndk-build configurations, such as toolchain arguments and compiler flags.

FailureRetention

This interface is deprecated. Renamed to EmulatorSnapshots

FusedLibraryExtension
HasConfigurableValue
HasInitWith

For build types and product flavors, they can be initialized from the current state of another.

Installation

Options for the adb tool.

JacocoOptions

This interface is deprecated. Renamed to TestCoverage

JavaCompileOptions

DSL object for javaCompileOptions.

JniLibsPackaging

Packaging options for native library (.so) files

KeepRules

DSL object for external library dependencies keep rules configurations.

KmpOptimization

DSL object for configurations aimed for optimizing build process(e.g. speed, correctness)

KotlinMultiplatformAndroidCompilation
KotlinMultiplatformAndroidCompilationBuilder

Options to build a KotlinMultiplatformAndroidCompilation object.

KotlinMultiplatformAndroidExtension

Extension properties for Kotlin multiplatform Android libraries.

KotlinMultiplatformAndroidTarget
KotlinMultiplatformAndroidTestOnDevice
KotlinMultiplatformAndroidTestOnDeviceCompilation
KotlinMultiplatformAndroidTestOnJvm
KotlinMultiplatformAndroidTestOnJvmCompilation
LibraryAndroidResources
LibraryBaseFlavor
LibraryBuildFeatures

A list of build features that can be disabled or enabled in an Android Library project.

LibraryBuildType

Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.

LibraryDefaultConfig

Specifies defaults for properties that the Android library plugin applies to all build variants.

LibraryExtension

Extension for the Android Library Gradle Plugin.

LibraryKeepRules
LibraryProductFlavor

Encapsulates all product flavors properties for library projects.

LibraryPublishing

Maven publishing DSL object for configuring options related to publishing AAR.

LibrarySingleVariant

Single variant publishing options for library projects.

LibraryVariantDimension

Shared properties between DSL objects that contribute to a library variant.

Lint

DSL object for configuring lint options.

LintOptions

This interface is deprecated. Renamed to Lint

ManagedDevices

Options for Managed Devices

ManagedVirtualDevice

Device type for emulators to be managed by the Android Gradle Plugin.

MultiDexConfig
MultipleVariants

Multi variant publishing options.

Ndk

DSL object for per-variant NDK settings, such as the ABI filter.

NdkBuild

DSL object for per-module ndk-build configurations, such as the path to your Android.mk build script and external native build output directory.

NdkBuildFlags

DSL object for per-variant ndk-build options, such as ndk-build arguments and compiler flags.

Optimization

DSL object for configurations aimed for optimizing build process(e.g. speed, correctness).

Packaging
PostProcessing

DSL object for configuring postProcessing: removing dead code, obfuscating etc.

Prefab

Options for including Prefab packages in AARs.

PrivacySandboxSdkBundle
PrivacySandboxSdkExtension
ProductFlavor

Encapsulates all product flavors properties for this project.

Publishing

Maven publishing DSL object for configuring options related to publishing Android variants to a Maven repository.

PublishingOptions

Maven publishing options shared by SingleVariant and MultipleVariants.

ResourcesPackaging

Packaging options for java resource files

SdkComponents
SettingsExtension

Interface used for the android DSL in the settings.gradle[.kts] file, after the com.android.settings plugin is applied.

Shaders

Options for configuring scoped shader options.

SigningConfig

DSL object for configuring options related to signing for APKs and bundles.

SingleVariant

Single variant publishing options.

Split

Base data representing how an FULL_APK should be split for a given dimension (density, abi).

Splits

Options to configure Multiple APKs.

TestAndroidResources
TestBaseFlavor
TestBuildFeatures

A list of build features that can be disabled or enabled in an Android Test project.

TestBuildType

Build types define certain properties that Gradle uses when building and packaging your library, and are typically configured for different stages of your development lifecycle.

TestCoverage

Settings related to the gathering of code-coverage data from tests

TestDefaultConfig

Specifies defaults for properties that the Android test plugin applies to all build variants.

TestExtension

Extension for the Android Test Gradle Plugin.

TestFixtures

DSL object for configuring test fixtures.

TestOptions

Options for running tests.

TestProductFlavor

Encapsulates all product flavors properties for test projects.

TestVariantDimension

Shared properties between DSL objects that contribute to a separate-test-project variant.

TestedExtension

Common extension properties for the Android Application.

ToolOptions
UnitTestOptions

Options for controlling unit tests execution.

VariantDimension

Shared properties between DSL objects that contribute to a variant.

VectorDrawables

DSL object used to configure vector drawable options.

ViewBinding

DSL object for configuring viewbinding options.

Extension functions summary

Extension functions