# CommonExtension

```
interface CommonExtension<BuildFeaturesT : BuildFeatures, BuildTypeT : BuildType, DefaultConfigT : DefaultConfig, ProductFlavorT : ProductFlavor>
```

|---|
| [com.android.build.api.dsl.CommonExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#) |

|---|
| Known Direct Subclasses [ApplicationExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationExtension), [DynamicFeatureExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureExtension), [LibraryExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryExtension), [TestExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestExtension) |---|---| | [ApplicationExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApplicationExtension) | Extension for the Android Gradle Plugin Application plugin. | | [DynamicFeatureExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DynamicFeatureExtension) | Extension for the Android Dynamic Feature Gradle Plugin. | | [LibraryExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LibraryExtension) | Extension for the Android Library Gradle Plugin. | | [TestExtension](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestExtension) | Extension for the Android Test Gradle Plugin. | |

Common extension properties for the Android Application. Library and Dynamic Feature Plugins.

Only the Android Gradle Plugin should create instances of this interface.

## Summary

| ### Public methods ||
|---|---|
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#aaptOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the Android Asset Packaging Tool (AAPT). |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#adbOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#androidResources(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidResources.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options related to the processing of Android Resources. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildFeatures(kotlin.Function1)(action: BuildFeaturesT.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` A list of build features that can be enabled or disabled on the Android Project. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildToolsVersion(kotlin.String)(buildToolsVersion: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildTypes(kotlin.Function1)(action: https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<BuildTypeT>.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates all build type configurations for this project. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CompileOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies Java compiler options, such as the language level of the Java source code and generated bytecode. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdkAddon(kotlin.String,%20kotlin.String,%20kotlin.Int)(vendor: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, version: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.Int)(apiLevel: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.String)(version: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#composeOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ComposeOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#dataBinding(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DataBinding.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html). |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<BuildTypeT>.https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#(org.gradle.api.NamedDomainObjectContainer).debug(kotlin.Function1)(action: BuildTypeT.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Shortcut extension method to allow easy access to the predefined `debug` [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType) |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#defaultConfig(kotlin.Function1)(action: DefaultConfigT.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies defaults for variant properties that the Android plugin applies to all build variants. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#externalNativeBuild(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuild.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for external native build using [CMake](https://cmake.org/) or [ndk-build](https://developer.android.com/ndk/guides/ndk-build.html). |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#flavorDimensions(kotlin.String)(vararg dimensions: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` <br /> |
| abstract [File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#getDefaultProguardFile(kotlin.String)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` <br /> |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#installation(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Installation.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#jacoco(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/JacocoOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Configure the gathering of code-coverage from tests. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#lint(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Lint.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the lint tool. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#lintOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LintOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the lint tool. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#packagingOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PackagingOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options and rules that determine which files the Android plugin packages into your APK. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#productFlavors(kotlin.Function1)(action: https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<ProductFlavorT>.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates all product flavors configurations for this project. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<BuildTypeT>.https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#(org.gradle.api.NamedDomainObjectContainer).release(kotlin.Function1)(action: BuildTypeT.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Shortcut extension method to allow easy access to the predefined `release` [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType) |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#signingConfigs(kotlin.Function1)(action: https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<out https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApkSigningConfig>.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates signing configurations that you can apply to [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType) and [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor) configurations. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#sourceSets(kotlin.Function1)(action: https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<out https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet>.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Encapsulates source set configurations for all variants. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#splits(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Splits.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies configurations for [building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html) or APK splits. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testCoverage(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestCoverage.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Configure the gathering of code-coverage from tests. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testOptions(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestOptions.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for how the Android plugin should run local and instrumented tests. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#useLibrary(kotlin.String)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Includes the specified library to the classpath. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#useLibrary(kotlin.String,%20kotlin.Boolean)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, required: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Includes the specified library to the classpath. |

| ### Properties ||
|---|---|
| abstract [AaptOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#aaptOptions:com.android.build.api.dsl.AaptOptions` Specifies options for the Android Asset Packaging Tool (AAPT). |
| abstract [AdbOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#adbOptions:com.android.build.api.dsl.AdbOptions` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| abstract [AndroidResources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidResources) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#androidResources:com.android.build.api.dsl.AndroidResources` Specifies options related to the processing of Android Resources. |
| abstract BuildFeaturesT | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildFeatures:com.android.build.api.dsl.CommonExtension.BuildFeaturesT` A list of build features that can be enabled or disabled on the Android Project. |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildToolsVersion:kotlin.String` Specifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project. |
| abstract [NamedDomainObjectContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html)\<out BuildTypeT\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#buildTypes:org.gradle.api.NamedDomainObjectContainer` Encapsulates all build type configurations for this project. |
| abstract [CompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CompileOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileOptions:com.android.build.api.dsl.CompileOptions` Specifies Java compiler options, such as the language level of the Java source code and generated bytecode. |
| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdk:kotlin.Int` Specifies the API level to compile your project against. |
| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdkExtension:kotlin.Int` <br /> |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#compileSdkPreview:kotlin.String` Specify a preview API to compile your project against. |
| abstract [ComposeOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ComposeOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#composeOptions:com.android.build.api.dsl.ComposeOptions` <br /> |
| abstract [DataBinding](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DataBinding) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#dataBinding:com.android.build.api.dsl.DataBinding` Specifies options for the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html). |
| abstract DefaultConfigT | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#defaultConfig:com.android.build.api.dsl.CommonExtension.DefaultConfigT` Specifies defaults for variant properties that the Android plugin applies to all build variants. |
| abstract [MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#experimentalProperties:kotlin.collections.MutableMap` Additional per module experimental properties. |
| abstract [ExternalNativeBuild](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuild) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#externalNativeBuild:com.android.build.api.dsl.ExternalNativeBuild` Specifies options for external native build using [CMake](https://cmake.org/) or [ndk-build](https://developer.android.com/ndk/guides/ndk-build.html). |
| abstract [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#flavorDimensions:kotlin.collections.MutableList` Specifies the names of product flavor dimensions for this project. |
| abstract [Installation](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Installation) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#installation:com.android.build.api.dsl.Installation` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| abstract [JacocoOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/JacocoOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#jacoco:com.android.build.api.dsl.JacocoOptions` Configure the gathering of code-coverage from tests. |
| abstract [Lint](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Lint) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#lint:com.android.build.api.dsl.Lint` Specifies options for the lint tool. |
| abstract [LintOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LintOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#lintOptions:com.android.build.api.dsl.LintOptions` Specifies options for the lint tool. |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#namespace:kotlin.String` The namespace of the generated R and BuildConfig classes. |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#ndkPath:kotlin.String` Requires the specified path to NDK be used. |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#ndkVersion:kotlin.String` Requires the specified NDK version to be used. |
| abstract [PackagingOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PackagingOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#packagingOptions:com.android.build.api.dsl.PackagingOptions` Specifies options and rules that determine which files the Android plugin packages into your APK. |
| abstract [NamedDomainObjectContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html)\<out ProductFlavorT\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#productFlavors:org.gradle.api.NamedDomainObjectContainer` Encapsulates all product flavors configurations for this project. |
| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#resourcePrefix:kotlin.String` Specifies this project's resource prefix to Android Studio for editor features, such as Lint checks. |
| abstract [SdkComponents](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/SdkComponents) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#sdkComponents:com.android.build.api.dsl.SdkComponents` <br /> |
| abstract [NamedDomainObjectContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html)\<out [ApkSigningConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApkSigningConfig)\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#signingConfigs:org.gradle.api.NamedDomainObjectContainer` Encapsulates signing configurations that you can apply to \[ \] and \[ \] configurations. |
| abstract [NamedDomainObjectContainer](https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html)\<out [AndroidSourceSet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet)\> | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#sourceSets:org.gradle.api.NamedDomainObjectContainer` Encapsulates source set configurations for all variants. |
| abstract [Splits](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Splits) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#splits:com.android.build.api.dsl.Splits` Specifies configurations for [building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html) or APK splits. |
| abstract [TestCoverage](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestCoverage) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testCoverage:com.android.build.api.dsl.TestCoverage` Configure the gathering of code-coverage from tests. |
| abstract [TestOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestOptions) | `https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testOptions:com.android.build.api.dsl.TestOptions` Specifies options for how the Android plugin should run local and instrumented tests. |

## Public methods

### aaptOptions

```
@Incubating abstract fun aaptOptions(action: AaptOptions.() -> Unit): Unit
```

**Deprecated.**

Specifies options for the Android Asset Packaging Tool (AAPT).

For more information about the properties you can configure in this block, see [AaptOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions).

### adbOptions

```
@Incubating abstract fun adbOptions(action: AdbOptions.() -> Unit): Unit
```

**Deprecated.**

Specifies options for the
[Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html),
such as APK installation options.

For more information about the properties you can configure in this block, see [AdbOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions).

### androidResources

```
abstract fun androidResources(action: AndroidResources.() -> Unit): Unit
```

Specifies options related to the processing of Android Resources.

For more information about the properties you can configure in this block, see [AndroidResources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidResources).

### buildFeatures

```
@Incubating abstract fun buildFeatures(action: BuildFeaturesT.() -> Unit): Unit
```

A list of build features that can be enabled or disabled on the Android Project.

### buildToolsVersion

```
@Incubating abstract fun buildToolsVersion(buildToolsVersion: String): Unit
```

**Deprecated.**

### buildTypes

```
abstract fun buildTypes(action: NamedDomainObjectContainer<BuildTypeT>.() -> Unit): Unit
```

Encapsulates all build type configurations for this project.

For more information about the properties you can configure in this block, see [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType)

### compileOptions

```
abstract fun compileOptions(action: CompileOptions.() -> Unit): Unit
```

Specifies Java compiler options, such as the language level of the Java source code and
generated bytecode.

For more information about the properties you can configure in this block, see [CompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CompileOptions).

### compileSdkAddon

```
abstract fun compileSdkAddon(
    vendor: String, 
    name: String, 
    version: Int
): Unit
```

### compileSdkVersion

```
@Incubating abstract fun compileSdkVersion(apiLevel: Int): Unit
```

**Deprecated.**

### compileSdkVersion

```
@Incubating abstract fun compileSdkVersion(version: String): Unit
```

**Deprecated.**

### composeOptions

```
@Incubating abstract fun composeOptions(action: ComposeOptions.() -> Unit): Unit
```

### dataBinding

```
abstract fun dataBinding(action: DataBinding.() -> Unit): Unit
```

Specifies options for the
[Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html).

For more information about the properties you can configure in this block, see [DataBinding](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DataBinding)

### debug

```
abstract fun NamedDomainObjectContainer<BuildTypeT>.debug(action: BuildTypeT.() -> Unit): Unit
```

Shortcut extension method to allow easy access to the predefined `debug` [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType)

For example:

```
 android {
     buildTypes {
         debug {
             // ...
         }
     }
}
```

### defaultConfig

```
abstract fun defaultConfig(action: DefaultConfigT.() -> Unit): Unit
```

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

You can override any `defaultConfig` property when
[configuring product flavors](https://developer.android.com/studio/build/build-variants.html#product-flavors)

For more information about the properties you can configure in this block, see [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig).

### externalNativeBuild

Added in [API level 2.2.0](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
abstract fun externalNativeBuild(action: ExternalNativeBuild.() -> Unit): Unit
```

Specifies options for external native build using [CMake](https://cmake.org/) or
[ndk-build](https://developer.android.com/ndk/guides/ndk-build.html).

When using
[Android Studio 2.2 or higher](https://developer.android.com/studio/index.html) with
[Android plugin 2.2.0 or higher](https://developer.android.com/studio/releases/gradle-plugin.html),
you can compile C and C++ code into a native library that Gradle packages into your APK.

To learn more, read
[Add C and C++ Code to Your Project](https://developer.android.com/studio/projects/add-native-code.html).
**See Also**

- `
  https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuild

  `

### flavorDimensions

```
@Incubating abstract fun flavorDimensions(vararg dimensions: String): Unit
```

**Deprecated.**

### getDefaultProguardFile

```
@Incubating abstract fun getDefaultProguardFile(name: String): File
```

### installation

```
abstract fun installation(action: Installation.() -> Unit): Unit
```

Specifies options for the
[Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html),
such as APK installation options.

For more information about the properties you can configure in this block, see [AdbOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions).

### jacoco

```
@Incubating abstract fun jacoco(action: JacocoOptions.() -> Unit): Unit
```

**Deprecated.**

Configure the gathering of code-coverage from tests.

This is replaced by [testCoverage](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testCoverage(kotlin.Function1)).

### lint

```
abstract fun lint(action: Lint.() -> Unit): Unit
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see [Lint](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Lint).

### lintOptions

```
@Incubating abstract fun lintOptions(action: LintOptions.() -> Unit): Unit
```

**Deprecated.**

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see [LintOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LintOptions).

### packagingOptions

```
@Incubating abstract fun packagingOptions(action: PackagingOptions.() -> Unit): Unit
```

Specifies options and rules that determine which files the Android plugin packages into your
APK.

For more information about the properties you can configure in this block, see [PackagingOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PackagingOptions).

### productFlavors

```
abstract fun productFlavors(action: NamedDomainObjectContainer<ProductFlavorT>.() -> Unit): Unit
```

Encapsulates all product flavors configurations for this project.

For more information about the properties you can configure in this block,
see [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor)

### release

```
abstract fun NamedDomainObjectContainer<BuildTypeT>.release(action: BuildTypeT.() -> Unit): Unit
```

Shortcut extension method to allow easy access to the predefined `release` [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType)

For example:

```
 android {
     buildTypes {
         release {
             // ...
         }
     }
}
```

### signingConfigs

```
@Incubating abstract fun signingConfigs(action: NamedDomainObjectContainer<out ApkSigningConfig>.() -> Unit): Unit
```

Encapsulates signing configurations that you can apply to
[BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType) and [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor) configurations.

For more information about the properties you can configure in this block,
see [ApkSigningConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApkSigningConfig).

### sourceSets

```
@Incubating abstract fun sourceSets(action: NamedDomainObjectContainer<out AndroidSourceSet>.() -> Unit): Unit
```

Encapsulates source set configurations for all variants.

Note that the Android plugin uses its own implementation of source sets. For more
information about the properties you can configure in this block, see [AndroidSourceSet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet).

### splits

```
@Incubating abstract fun splits(action: Splits.() -> Unit): Unit
```

Specifies configurations for
[building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html)
or APK splits.

For more information about the properties you can configure in this block, see [Splits](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Splits).

### testCoverage

```
abstract fun testCoverage(action: TestCoverage.() -> Unit): Unit
```

Configure the gathering of code-coverage from tests.

To override the JaCoCo version that is used for offline instrumentation and coverage report,
add the following to `build.gradle` file:

```
android {
    testCoverage {
        jacocoVersion "<jacoco-version>"
    }
}
```

For more information about the properties you can configure in this block, see [TestCoverage](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestCoverage).

### testOptions

```
@Incubating abstract fun testOptions(action: TestOptions.() -> Unit): Unit
```

Specifies options for how the Android plugin should run local and instrumented tests.

For more information about the properties you can configure in this block, see [TestOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestOptions).

### useLibrary

```
@Incubating abstract fun useLibrary(name: String): Unit
```

Includes the specified library to the classpath.

You typically use this property to support optional platform libraries that ship with the
Android SDK. The following sample adds the Apache HTTP API library to the project classpath:

```
android {
    // Adds a platform library that ships with the Android SDK.
    useLibrary 'org.apache.http.legacy'
}
```

To include libraries that do not ship with the SDK, such as local library modules or
binaries from remote repositories,
[add the libraries as dependencies](https://developer.android.com/studio/build/dependencies.html)
in the `dependencies` block. Note that Android plugin 3.0.0 and later introduce
[new dependency configurations](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations).
To learn more about Gradle dependencies, read
[Dependency Management Basics](https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html).

| Parameters ||
|---|---|
| name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the name of the library. |

### useLibrary

```
@Incubating abstract fun useLibrary(
    name: String, 
    required: Boolean
): Unit
```

Includes the specified library to the classpath.

You typically use this property to support optional platform libraries that ship with the
Android SDK. The following sample adds the Apache HTTP API library to the project classpath:

```
android {
    // Adds a platform library that ships with the Android SDK.
    useLibrary 'org.apache.http.legacy'
}
```

To include libraries that do not ship with the SDK, such as local library modules or
binaries from remote repositories,
[add the libraries as dependencies]("https://developer.android.com/studio/build/dependencies.html)
in the `dependencies` block. Note that Android plugin 3.0.0 and later introduce
[new dependency configurations](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/new dependency configurations).
To learn more about Gradle dependencies, read
[Dependency Management Basics](https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html)

| Parameters ||
|---|---|
| name: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the name of the library. |
| required: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | if using the library requires a manifest entry, the entry will indicate that the library is not required. |

## Properties

### aaptOptions

```
abstract val aaptOptions: AaptOptions
```

**Deprecated.**

Specifies options for the Android Asset Packaging Tool (AAPT).

For more information about the properties you can configure in this block, see [AaptOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions).

### adbOptions

```
abstract val adbOptions: AdbOptions
```

**Deprecated.**

Specifies options for the
[Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html),
such as APK installation options.

For more information about the properties you can configure in this block, see [AdbOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions).

### androidResources

```
abstract val androidResources: AndroidResources
```

Specifies options related to the processing of Android Resources.

For more information about the properties you can configure in this block, see [AndroidResources](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidResources).

### buildFeatures

```
abstract val buildFeatures: BuildFeaturesT
```

A list of build features that can be enabled or disabled on the Android Project.

### buildToolsVersion

```
abstract var buildToolsVersion: String
```

Specifies the version of the
[SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html)
to use when building your project.

When using Android plugin 3.0.0 or later, configuring this property is optional. By
default, the plugin uses the minimum version of the build tools required by the
[version of the plugin](https://developer.android.com/studio/releases/gradle-plugin.html#revisions)
you're using.
To specify a different version of the build tools for the plugin to use,
specify the version as follows:

```
android {
    // Specifying this property is optional.
    buildToolsVersion "26.0.0"
}
```

For a list of build tools releases, read
[the release notes](https://developer.android.com/studio/releases/build-tools.html#notes).

Note that the value assigned to this property is parsed and stored in a normalized form,
so reading it back may give a slightly different result.

### buildTypes

```
abstract val buildTypes: NamedDomainObjectContainer<out BuildTypeT>
```

Encapsulates all build type configurations for this project.

Unlike using [ProductFlavor](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor) to create
different versions of your project that you expect to co-exist on a single device, build
types determine how Gradle builds and packages each version of your project. Developers
typically use them to configure projects for various stages of a development lifecycle. For
example, when creating a new project from Android Studio, the Android plugin configures a
'debug' and 'release' build type for you. By default, the 'debug' build type enables
debugging options and signs your APK with a generic debug keystore. Conversely, The 'release'
build type strips out debug symbols and requires you to
[create a release key and keystore](https://developer.android.com/studio/publish/app-signing.html#sign-apk)
for your app. You can then combine build types with product flavors to
[create build variants](https://developer.android.com/studio/build/build-variants.html).

### compileOptions

```
abstract val compileOptions: CompileOptions
```

Specifies Java compiler options, such as the language level of the Java source code and
generated bytecode.

For more information about the properties you can configure in this block, see [CompileOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CompileOptions).

### compileSdk

```
abstract var compileSdk: Int?
```

Specifies the API level to compile your project against. The Android plugin requires you to
configure this property.

This means your code can use only the Android APIs included in that API level and lower.
You can configure the compile sdk version by adding the following to the `android`
block: `compileSdk = 26`.

You should generally
[use the most up-to-date API level](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)
available.
If you are planning to also support older API levels, it's good practice to
[use the Lint tool](https://developer.android.com/studio/write/lint.html)
to check if you are using APIs that are not available in earlier API levels.

The value you assign to this property is parsed and stored in a normalized form, so
reading it back may return a slightly different value.

### compileSdkExtension

```
abstract var compileSdkExtension: Int?
```

### compileSdkPreview

```
abstract var compileSdkPreview: String?
```

Specify a preview API to compile your project against.

For example, to try out the Android S preview,
rather than `compileSdk = 30` you can use `compileSdkPreview = "S"`

Once the preview APIs are finalized, they will be allocated a stable integer value.

### composeOptions

```
abstract val composeOptions: ComposeOptions
```

### dataBinding

```
abstract val dataBinding: DataBinding
```

Specifies options for the
[Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html).

For more information about the properties you can configure in this block, see [DataBinding](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DataBinding)

### defaultConfig

```
abstract val defaultConfig: DefaultConfigT
```

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

You can override any `defaultConfig` property when
[configuring product flavors](https://developer.android.com/studio/build/build-variants.html#product-flavors)

For more information about the properties you can configure in this block, see [DefaultConfig](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/DefaultConfig).

### experimentalProperties

```
abstract val experimentalProperties: MutableMap<String, Any>
```

Additional per module experimental properties.

### externalNativeBuild

Added in [API level 2.2.0](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
abstract val externalNativeBuild: ExternalNativeBuild
```

Specifies options for external native build using [CMake](https://cmake.org/) or
[ndk-build](https://developer.android.com/ndk/guides/ndk-build.html).

When using
[Android Studio 2.2 or higher](https://developer.android.com/studio/index.html) with
[Android plugin 2.2.0 or higher](https://developer.android.com/studio/releases/gradle-plugin.html),
you can compile C and C++ code into a native library that Gradle packages into your APK.

To learn more, read
[Add C and C++ Code to Your Project](https://developer.android.com/studio/projects/add-native-code.html).
**See Also**

- `
  https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ExternalNativeBuild

  `

### flavorDimensions

```
abstract val flavorDimensions: MutableList<String>
```

Specifies the names of product flavor dimensions for this project.

When configuring product flavors with Android plugin 3.0.0 and higher, you must specify at
least one flavor dimension, using the
[`flavorDimensions`](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#flavorDimensions(kotlin.String)) property, and then assign each flavor to a dimension.
Otherwise, you will get the following build error:

```
Error:All flavors must now belong to a named flavor dimension.
The flavor 'flavor_name' is not assigned to a flavor dimension.
```

By default, when you specify only one dimension, all flavors you configure automatically
belong to that dimension. If you specify more than one dimension, you need to manually assign
each flavor to a dimension, as shown in the sample below.

Flavor dimensions allow you to create groups of product flavors that you can combine with
flavors from other flavor dimensions. For example, you can have one dimension that includes a
'free' and 'paid' version of your app, and another dimension for flavors that support
different API levels, such as 'minApi21' and 'minApi24'. The Android plugin can then combine
flavors from these dimensions---including their settings, code, and resources---to create
variants such as 'debugFreeMinApi21' and 'releasePaidMinApi24', and so on. The sample below
shows you how to specify flavor dimensions and add product flavors to them.

```
android {
    ...
    // Specifies the flavor dimensions you want to use. The order in which you
    // list each dimension determines its priority, from highest to lowest,
    // when Gradle merges variant sources and configurations. You must assign
    // each product flavor you configure to one of the flavor dimensions.
    flavorDimensions 'api', 'version'

    productFlavors {
      demo {
        // Assigns this product flavor to the 'version' flavor dimension.
        dimension 'version'
        ...
    }

      full {
        dimension 'version'
        ...
      }

      minApi24 {
        // Assigns this flavor to the 'api' dimension.
        dimension 'api'
        minSdkVersion '24'
        versionNameSuffix "-minApi24"
        ...
      }

      minApi21 {
        dimension "api"
        minSdkVersion '21'
        versionNameSuffix "-minApi21"
        ...
      }
   }
}
```

To learn more, read
[Combine multiple flavors](https://developer.android.com/studio/build/build-variants.html#flavor-dimensions).

### installation

```
abstract val installation: Installation
```

Specifies options for the
[Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html),
such as APK installation options.

For more information about the properties you can configure in this block, see [AdbOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AdbOptions).

### jacoco

```
abstract val jacoco: JacocoOptions
```

**Deprecated.**

Configure the gathering of code-coverage from tests.

This is replaced by [testCoverage](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/CommonExtension#testCoverage(kotlin.Function1)).

### lint

```
abstract val lint: Lint
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see [Lint](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Lint).

### lintOptions

```
abstract val lintOptions: LintOptions
```

**Deprecated.**

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see [LintOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/LintOptions).

### namespace

```
abstract var namespace: String?
```

The namespace of the generated R and BuildConfig classes. Also, the namespace used to resolve
any relative class names that are declared in the AndroidManifest.xml.

This value supersedes any value specified by the `package` attribute in the source
AndroidManifest.xml, but doing a 'get' on this property will not retrieve the value specified
in the AndroidManifest.xml.

### ndkPath

```
abstract var ndkPath: String?
```

Requires the specified path to NDK be used.

Use this to specify a path to the NDK folder to be used for C and C++ builds.

```
android {
    // Path to custom NDK location
    ndkPath '/path/to/ndk'
}
```

If this field is specified then android.ndkVersion may not be specified.

For additional information about NDK installation see
[Install and configure the NDK](https://developer.android.com/studio/projects/install-ndk).

### ndkVersion

```
abstract var ndkVersion: String?
```

Requires the specified NDK version to be used.

Use this to specify a fixed NDK version. Without this, each new version of the Android
Gradle Plugin will choose a specific version of NDK to use, so upgrading the plugin also
means upgrading the NDK. Locking to a specific version can increase repeatability of the
build.

```
android {
    // Use a fixed NDK version
    ndkVersion '20.1.5948944'
}
```

If this field is specified then android.ndkPath may not be specified.

The required format of the version is major.minor.build. It's not legal to
specify less precision.
If `ndk.dir` is specified in `local.properties` file then the NDK that it points to must
match the `android.ndkVersion`.

Prior to Android Gradle Plugin version 3.5, the highest installed version of NDK will be
used.
In Android Gradle Plugin 3.4, specifying `android.ndkVersion` was not an error, but the value
would be ignored.
Prior to Android Gradle Plugin version 3.4, it was illegal to specify `android.ndkVersion`.

For additional information about NDK installation see
[Install and configure the NDK](https://developer.android.com/studio/projects/install-ndk).

### packagingOptions

```
abstract val packagingOptions: PackagingOptions
```

Specifies options and rules that determine which files the Android plugin packages into your
APK.

For more information about the properties you can configure in this block, see [PackagingOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PackagingOptions).

### productFlavors

```
abstract val productFlavors: NamedDomainObjectContainer<out ProductFlavorT>
```

Encapsulates all product flavors configurations for this project.

Product flavors represent different versions of your project that you expect to co-exist
on a single device, the Google Play store, or repository. For example, you can configure
'demo' and 'full' product flavors for your app, and each of those flavors can specify
different features, device requirements, resources, and application ID's--while sharing
common source code and resources. So, product flavors allow you to output different versions
of your project by simply changing only the components and settings that are different
between them.

Configuring product flavors is similar to
[configuring build types](https://developer.android.com/studio/build/build-variants.html#build-types):
add them to the `productFlavors` block of your project's `build.gradle` file
and configure the settings you want.
Product flavors support the same properties as the `defaultConfig`
block--this is because `defaultConfig` defines an object that the plugin uses as the base
configuration for all other flavors. Each flavor you configure can then override any of the
default values in `defaultConfig`, such as the
[`applicationId`](https://d.android.com/studio/build/application-id.html).

When using Android plugin 3.0.0 and higher, *each flavor must belong to a[`flavorDimension`](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/com.android.build.gradle.BaseExtension#com.android.build.gradle.BaseExtension:flavorDimensions(java.lang.String[]))value* . By default, when you specify only one
dimension, all flavors you configure belong to that dimension. If you specify more than one
flavor dimension, you need to manually assign each flavor to a dimension. To learn more, read
[Use Flavor Dimensions for variant-aware dependency management](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#variant_aware).

When you configure product flavors, the Android plugin automatically combines them with
your [BuildType](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/BuildType) configurations to
[create build variants](https://developer.android.com/studio/build/build-variants.html).
If the plugin creates certain build variants that you don't want, you can
[filter variants](https://developer.android.com/studio/build/build-variants.html#filter-variants).
**See Also**

- `
  https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ProductFlavor

  `

### resourcePrefix

```
abstract var resourcePrefix: String?
```

Specifies this project's resource prefix to Android Studio for editor features, such as Lint
checks. This property is useful only when using Android Studio.

Including unique prefixes for project resources helps avoid naming collisions with
resources from other projects.

For example, when creating a library with String resources,
you may want to name each resource with a unique prefix, such as "`mylib_`"
to avoid naming collisions with similar resources that the consumer defines.

You can then specify this prefix, as shown below, so that Android Studio expects this prefix
when you name project resources:

```
// This property is useful only when developing your project in Android Studio.
resourcePrefix 'mylib_'
```

### sdkComponents

```
abstract val sdkComponents: SdkComponents
```

**Deprecated.**

### signingConfigs

```
abstract val signingConfigs: NamedDomainObjectContainer<out ApkSigningConfig>
```

Encapsulates signing configurations that you can apply to \[ \] and \[ \] configurations.

Android requires that all APKs be digitally signed with a certificate before they can be
installed onto a device. When deploying a debug version of your project from Android Studio,
the Android plugin automatically signs your APK with a generic debug certificate. However, to
build an APK for release, you must
[sign the APK](https://developer.android.com/studio/publish/app-signing.html)
with a release key and keystore.
You can do this by either
[using the Android Studio UI](https://developer.android.com/studio/publish/app-signing.html#sign-apk)
or manually
[configuring your `build.gradle` file](https://developer.android.com/studio/publish/app-signing.html#gradle-sign).
**See Also**

- `
  https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/ApkSigningConfig

  `

### sourceSets

```
abstract val sourceSets: NamedDomainObjectContainer<out AndroidSourceSet>
```

Encapsulates source set configurations for all variants.

Note that the Android plugin uses its own implementation of source sets. For more
information about the properties you can configure in this block, see [AndroidSourceSet](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AndroidSourceSet).

### splits

```
abstract val splits: Splits
```

Specifies configurations for
[building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html)
or APK splits.

For more information about the properties you can configure in this block, see [Splits](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/Splits).

### testCoverage

```
abstract val testCoverage: TestCoverage
```

Configure the gathering of code-coverage from tests.

To override the JaCoCo version that is used for offline instrumentation and coverage report,
add the following to `build.gradle` file:

```
android {
    testCoverage {
        jacocoVersion "<jacoco-version>"
    }
}
```

For more information about the properties you can configure in this block, see [TestCoverage](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestCoverage).

### testOptions

```
abstract val testOptions: TestOptions
```

Specifies options for how the Android plugin should run local and instrumented tests.

For more information about the properties you can configure in this block, see [TestOptions](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/TestOptions).