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 Android resource 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.

AndroidTest

DSL object on library build type for configurations of the android test component.

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

DSL object for configuring Android resource options for Application plugins.

ApplicationBaseFlavor

Shared properties between ApplicationProductFlavor and ApplicationDefaultConfig

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.

ApplicationInstallation
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

DSL object for configuring the Android Application Bundle

BundleAbi

DSL object for configuring the App Bundle ABI options

BundleCodeTransparency

DSL object for configuring the App Bundle Code Transparency options

BundleCountrySet

DSL object for configuring the App Bundle Country Set options

BundleDensity

DSL object for configuring the App Bundle Density options

BundleDeviceTier

DSL object for configuring the App Bundle Device Tier options

BundleLanguage

DSL object for configuring the App Bundle Language options

BundleStoreArchive

DSL object for configuring the App Bundle Store Archive options

BundleTexture

DSL object for configuring the App Bundle Texture options

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 in the Android DSL

DynamicDelivery

DSL object to configure dynamic delivery of an asset pack.

DynamicFeatureAndroidResources

DSL object for configuring Android resource options for Dynamic Feature plugins.

DynamicFeatureBaseFlavor

Shared properties between DSL objects DynamicFeatureProductFlavor and DynamicFeatureDefaultConfig

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.

DynamicFeatureInstallation

DSL object for configuring installation options for Dynamic Feature plugins.

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

HasConfigurableValue
HasInitWith

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

Installation

Local 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 in the Android DSL

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

DSL object for configuring Android resource options for Library plugins.

LibraryBaseFlavor

Shared properties between LibraryProductFlavor and LibraryDefaultConfig

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.

LibraryInstallation

DSL object for configuring installation options for Library plugins.

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

Packaging option entry point for the Android DSL.

PostProcessing

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

Prefab

Options for including Prefab packages in AARs.

PrivacySandbox

Privacy Sandbox library consumption options

PrivacySandboxKeepRules
PrivacySandboxSdkBundle
PrivacySandboxSdkExtension
PrivacySandboxSdkOptimization

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

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 in the Android DSL

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 APK should be split for a given dimension (density, abi).

Splits

Options to configure Multiple APKs.

TestAndroidResources

DSL object for configuring Android resource options for Test plugins.

TestBaseFlavor

Shared properties between TestProductFlavor and TestDefaultConfig

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.

TestInstallation

DSL object for configuring installation options for Test plugins.

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.

VcsInfo

DSL object for configuring Version Control information

VectorDrawables

DSL object used to configure vector drawable options.

ViewBinding

DSL object for configuring viewbinding options.

Extension functions summary

Extension functions