# CommonExtension


```
public interface CommonExtension<BuildFeaturesT extends BuildFeatures, BuildTypeT extends BuildType, DefaultConfigT extends DefaultConfig, ProductFlavorT extends ProductFlavor, AndroidResourcesT extends AndroidResources>
```

<br />

Known direct subclasses [ApplicationExtension](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ApplicationExtension), [DynamicFeatureExtension](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DynamicFeatureExtension), [LibraryExtension](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LibraryExtension), [TestExtension](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestExtension)

|---|---|
| `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ApplicationExtension` | Extension for the Android Gradle Plugin Application plugin. |
| `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DynamicFeatureExtension` | Extension for the Android Dynamic Feature Gradle Plugin. |
| `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LibraryExtension` | Extension for the Android Library Gradle Plugin. |
| `https://developer.android.com/reference/tools/gradle-api/8.3/null/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 void` | `[aaptOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#aaptOptions(kotlin.Function1))( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AaptOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` **This method is deprecated.** Replaced by |
| `abstract void` | `[adbOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#adbOptions(kotlin.Function1))( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` **This method is deprecated.** Replaced by installation |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#androidResources(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull AndroidResourcesT, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options related to the processing of Android Resources. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#buildFeatures(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildFeaturesT, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` A list of build features that can be enabled or disabled on the Android Project. |
| `abstract void` | `[buildToolsVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#buildToolsVersion(kotlin.String))(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html buildToolsVersion)` **This method is deprecated.** Replaced by buildToolsVersion property |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#buildTypes(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT>, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Encapsulates all build type configurations for this project. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileOptions(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CompileOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies Java compiler options, such as the language level of the Java source code and generated bytecode. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileSdkAddon(kotlin.String,kotlin.String,kotlin.Int)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html vendor, @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name, int version)` Specify an SDK add-on to compile your project against. |
| `abstract void` | `[compileSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.Int))(int apiLevel)` **This method is deprecated.** Replaced by compileSdk |
| `abstract void` | `[compileSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.String))(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html version)` **This method is deprecated.** Replaced by compileSdkPreview |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#composeOptions(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ComposeOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#dataBinding(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DataBinding, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options for the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html). |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#(org.gradle.api.NamedDomainObjectContainer).debug(kotlin.Function1)( @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT> receiver, @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Shortcut extension method to allow easy access to the predefined `debug` `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType` |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#defaultConfig(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull DefaultConfigT, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies defaults for variant properties that the Android plugin applies to all build variants. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#externalNativeBuild(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ExternalNativeBuild, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options for external native build using [CMake](https://cmake.org/) or [ndk-build](https://developer.android.com/ndk/guides/ndk-build.html). |
| `abstract void` | `[flavorDimensions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#flavorDimensions(kotlin.Array))(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html dimensions)` **This method is deprecated.** Replaced by flavorDimensions property |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AaptOptions` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getAaptOptions()()` Specifies options for the Android Asset Packaging Tool (AAPT). |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getAdbOptions()()` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull AndroidResourcesT` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getAndroidResources()()` Specifies options related to the processing of Android Resources. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildFeaturesT` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getBuildFeatures()()` A list of build features that can be enabled or disabled on the Android Project. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getBuildToolsVersion()()` Specifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT>` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getBuildTypes()()` Encapsulates all build type configurations for this project. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CompileOptions` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getCompileOptions()()` Specifies Java compiler options, such as the language level of the Java source code and generated bytecode. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getCompileSdk()()` Specifies the API level to compile your project against. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getCompileSdkExtension()()` Specifies the SDK Extension level to compile your project against. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getCompileSdkPreview()()` Specify a preview API to compile your project against. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ComposeOptions` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getComposeOptions()()` |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DataBinding` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getDataBinding()()` Specifies options for the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/index.html). |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull DefaultConfigT` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getDefaultConfig()()` Specifies defaults for variant properties that the Android plugin applies to all build variants. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getDefaultProguardFile(kotlin.String)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name)` |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html, @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html>` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getExperimentalProperties()()` Additional per module experimental properties. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ExternalNativeBuild` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getExternalNativeBuild()()` Specifies options for external native build using [CMake](https://cmake.org/) or [ndk-build](https://developer.android.com/ndk/guides/ndk-build.html). |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html>` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getFlavorDimensions()()` Specifies the names of product flavor dimensions for this project. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Installation` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getInstallation()()` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/JacocoOptions` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getJacoco()()` Configure the gathering of code-coverage from tests. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Lint` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getLint()()` Specifies options for the lint tool. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LintOptions` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getLintOptions()()` Specifies options for the lint tool. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getNamespace()()` The namespace of the generated R and BuildConfig classes. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getNdkPath()()` Requires the specified path to NDK be used. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getNdkVersion()()` Requires the specified NDK version to be used. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getPackaging()()` Specifies options and rules that determine which files the Android plugin packages into your APK. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getPackagingOptions()()` Specifies options and rules that determine which files the Android plugin packages into your APK. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull ProductFlavorT>` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getProductFlavors()()` Encapsulates all product flavors configurations for this project. |
| `abstract https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getResourcePrefix()()` Specifies this project's resource prefix to Android Studio for editor features, such as Lint checks. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SdkComponents` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getSdkComponents()()` |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ApkSigningConfig>` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getSigningConfigs()()` Encapsulates signing configurations that you can apply to \[ \] and \[ \] configurations. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidSourceSet>` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getSourceSets()()` Encapsulates source set configurations for all variants. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Splits` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getSplits()()` Specifies configurations for [building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html) or APK splits. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestCoverage` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getTestCoverage()()` Configure the gathering of code-coverage from tests. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestOptions` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getTestOptions()()` Specifies options for how the Android plugin should run local and instrumented tests. |
| `abstract @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ViewBinding` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#getViewBinding()()` Specifies options for the [View Binding Library](https://developer.android.com/topic/libraries/view-binding/index.html). |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#installation(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Installation, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options for the [Android Debug Bridge (ADB)](https://developer.android.com/studio/command-line/adb.html), such as APK installation options. |
| `abstract void` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html [jacoco](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#jacoco(kotlin.Function1))( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/JacocoOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` **This method is deprecated.** Renamed to testCoverage |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#lint(kotlin.Function1)(@https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Lint, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action)` Specifies options for the lint tool. |
| `abstract void` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html [lintOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#lintOptions(kotlin.Function1))( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LintOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` **This method is deprecated.** Renamed to lint |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#packaging(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options and rules that determine which files the Android plugin packages into your APK. |
| `abstract void` | `[packagingOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#packagingOptions(kotlin.Function1))( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` **This method is deprecated.** Renamed to packaging |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#productFlavors(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull ProductFlavorT>, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Encapsulates all product flavors configurations for this project. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#(org.gradle.api.NamedDomainObjectContainer).release(kotlin.Function1)( @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT> receiver, @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull BuildTypeT, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Shortcut extension method to allow easy access to the predefined `release` `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType` |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setBuildToolsVersion(kotlin.String)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html buildToolsVersion)` Specifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setCompileSdk(kotlin.Int)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html compileSdk)` Specifies the API level to compile your project against. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setCompileSdkExtension(kotlin.Int)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html compileSdkExtension)` Specifies the SDK Extension level to compile your project against. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setCompileSdkPreview(kotlin.String)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html compileSdkPreview)` Specify a preview API to compile your project against. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setNamespace(kotlin.String)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html namespace)` The namespace of the generated R and BuildConfig classes. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setNdkPath(kotlin.String)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html ndkPath)` Requires the specified path to NDK be used. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setNdkVersion(kotlin.String)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html ndkVersion)` Requires the specified NDK version to be used. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#setResourcePrefix(kotlin.String)(https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html resourcePrefix)` Specifies this project's resource prefix to Android Studio for editor features, such as Lint checks. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#signingConfigs(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ApkSigningConfig>, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Encapsulates signing configurations that you can apply to `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType` and `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ProductFlavor` configurations. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#sourceSets(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidSourceSet>, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Encapsulates source set configurations for all variants. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#splits(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Splits, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies configurations for [building multiple APKs](https://developer.android.com/studio/build/configure-apk-splits.html) or APK splits. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#testCoverage(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestCoverage, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Configure the gathering of code-coverage from tests. |
| `abstract void` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#testOptions(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestOptions, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options for how the Android plugin should run local and instrumented tests. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#useLibrary(kotlin.String)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name)` Includes the specified library to the classpath. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#useLibrary(kotlin.String,kotlin.Boolean)(@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name, boolean required)` Includes the specified library to the classpath. |
| `abstract void` | `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#viewBinding(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ViewBinding, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> action )` Specifies options for the [View Binding Library](https://developer.android.com/topic/libraries/view-binding/index.html). |

## Public methods

### aaptOptions

```
abstract void [aaptOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#aaptOptions(kotlin.Function1))(
    @ExtensionFunctionType @NonNull Function1<@NonNull AaptOptions, Unit> action
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by

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

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AaptOptions`.

### adbOptions

```
abstract void [adbOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#adbOptions(kotlin.Function1))(
    @ExtensionFunctionType @NonNull Function1<@NonNull AdbOptions, Unit> action
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by 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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions`.

### androidResources

```
abstract void androidResources(
    @ExtensionFunctionType @NonNull Function1<@NonNull AndroidResourcesT, Unit> action
)
```

Specifies options related to the processing of Android Resources.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidResources`.

### buildFeatures

```
abstract void buildFeatures(
    @ExtensionFunctionType @NonNull Function1<@NonNull BuildFeaturesT, Unit> action
)
```

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

### buildToolsVersion

```
abstract void [buildToolsVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#buildToolsVersion(kotlin.String))(@NonNull String buildToolsVersion)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by buildToolsVersion property

### buildTypes

```
abstract void buildTypes(
    @ExtensionFunctionType @NonNull Function1<@NonNull NamedDomainObjectContainer<@NonNull BuildTypeT>, Unit> action
)
```

Encapsulates all build type configurations for this project.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType`

### compileOptions

```
abstract void compileOptions(
    @ExtensionFunctionType @NonNull Function1<@NonNull CompileOptions, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CompileOptions`.

### compileSdkAddon

```
abstract void compileSdkAddon(@NonNull String vendor, @NonNull String name, int version)
```

Specify an SDK add-on to compile your project against.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdkAddon(kotlin.String,kotlin.String,kotlin.Int)`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html vendor` | the vendor name of the add-on. |
| `@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name` | the name of the add-on |
| `int version` | the integer API level of the add-on |

### compileSdkVersion

```
abstract void [compileSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.Int))(int apiLevel)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by compileSdk

### compileSdkVersion

```
abstract void [compileSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#compileSdkVersion(kotlin.String))(@NonNull String version)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by compileSdkPreview

### composeOptions

```
abstract void composeOptions(
    @ExtensionFunctionType @NonNull Function1<@NonNull ComposeOptions, Unit> action
)
```

### dataBinding

```
abstract void dataBinding(
    @ExtensionFunctionType @NonNull Function1<@NonNull DataBinding, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DataBinding`

### debug

```
abstract void debug(
    @NonNull NamedDomainObjectContainer<@NonNull BuildTypeT> receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull BuildTypeT, Unit> action
)
```

Shortcut extension method to allow easy access to the predefined `debug` `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType`

For example:

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

### defaultConfig

```
abstract void defaultConfig(
    @ExtensionFunctionType @NonNull Function1<@NonNull DefaultConfigT, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DefaultConfig`.

### externalNativeBuild

```
abstract void externalNativeBuild(
    @ExtensionFunctionType @NonNull Function1<@NonNull ExternalNativeBuild, Unit> action
)
```

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/8.3/null/com/android/build/api/dsl/ExternalNativeBuild` | since 2.2.0 |

### flavorDimensions

```
abstract void [flavorDimensions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#flavorDimensions(kotlin.Array))(@NonNull String dimensions)
```

> [!CAUTION]
> **This method is deprecated.**   
> Replaced by flavorDimensions property

### getAaptOptions

```
abstract @NonNull AaptOptions getAaptOptions()
```

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

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AaptOptions`.

### getAdbOptions

```
abstract @NonNull AdbOptions getAdbOptions()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions`.

### getAndroidResources

```
abstract @NonNull AndroidResourcesT getAndroidResources()
```

Specifies options related to the processing of Android Resources.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidResources`.

### getBuildFeatures

```
abstract @NonNull BuildFeaturesT getBuildFeatures()
```

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

### getBuildToolsVersion

```
abstract @NonNull String getBuildToolsVersion()
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#buildToolsVersion()`

### getBuildTypes

```
abstract @NonNull NamedDomainObjectContainer<@NonNull BuildTypeT> getBuildTypes()
```

Encapsulates all build type configurations for this project.

Unlike using `https://developer.android.com/reference/tools/gradle-api/8.3/null/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).

| See also |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType` |   |

### getCompileOptions

```
abstract @NonNull CompileOptions getCompileOptions()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CompileOptions`.

### getCompileSdk

```
abstract Integer getCompileSdk()
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdk()`

### getCompileSdkExtension

```
abstract Integer getCompileSdkExtension()
```

Specifies the SDK Extension level to compile your project against. This value is optional.

When not provided the base extension for the given `compileSdk` API level will be selected.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdkExtension()`

### getCompileSdkPreview

```
abstract String getCompileSdkPreview()
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdkPreview()`

### getComposeOptions

```
abstract @NonNull ComposeOptions getComposeOptions()
```

### getDataBinding

```
abstract @NonNull DataBinding getDataBinding()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DataBinding`

### getDefaultConfig

```
abstract @NonNull DefaultConfigT getDefaultConfig()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DefaultConfig`.

### getDefaultProguardFile

```
abstract @NonNull File getDefaultProguardFile(@NonNull String name)
```

### getExperimentalProperties

```
@Incubating
abstract @NonNull Map<@NonNull String, @NonNull Object> getExperimentalProperties()
```

Additional per module experimental properties.

### getExternalNativeBuild

```
abstract @NonNull ExternalNativeBuild getExternalNativeBuild()
```

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/8.3/null/com/android/build/api/dsl/ExternalNativeBuild` | since 2.2.0 |

### getFlavorDimensions

```
abstract @NonNull List<@NonNull String> getFlavorDimensions()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#flavorDimensions(kotlin.Array)` 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).

### getInstallation

```
abstract @NonNull Installation getInstallation()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions`.

### getJacoco

```
@Incubating
abstract @NonNull JacocoOptions getJacoco()
```

Configure the gathering of code-coverage from tests.

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

### getLint

```
abstract @NonNull Lint getLint()
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Lint`.

### getLintOptions

```
@Incubating
abstract @NonNull LintOptions getLintOptions()
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LintOptions`.

### getNamespace

```
abstract String getNamespace()
```

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.

### getNdkPath

```
abstract String getNdkPath()
```

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 the version it refers to need to match the one specified in ndkVersion. If ndkVersion is not specified, ndkPath need to match the default ndkVersion

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

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#ndkPath()`

### getNdkVersion

```
abstract @NonNull String getNdkVersion()
```

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. If this field is not specified, a default value will be provided depending on the AGP version

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

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#ndkVersion()`

### getPackaging

```
abstract @NonNull Packaging getPackaging()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging`.

### getPackagingOptions

```
abstract @NonNull Packaging getPackagingOptions()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging`.

### getProductFlavors

```
abstract @NonNull NamedDomainObjectContainer<@NonNull ProductFlavorT> getProductFlavors()
```

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 com.android.build.gradle.BaseExtension.html#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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/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/8.3/null/com/android/build/api/dsl/ProductFlavor` |   |

### getResourcePrefix

```
abstract String getResourcePrefix()
```

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_'
```

### getSdkComponents

```
abstract @NonNull SdkComponents getSdkComponents()
```

### getSigningConfigs

```
abstract @NonNull NamedDomainObjectContainer<@NonNull ApkSigningConfig> getSigningConfigs()
```

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/8.3/null/com/android/build/api/dsl/ApkSigningConfig` |   |

### getSourceSets

```
abstract @NonNull NamedDomainObjectContainer<@NonNull AndroidSourceSet> getSourceSets()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidSourceSet`.

### getSplits

```
abstract @NonNull Splits getSplits()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Splits`.

### getTestCoverage

```
abstract @NonNull TestCoverage getTestCoverage()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestCoverage`.

### getTestOptions

```
@Incubating
abstract @NonNull TestOptions getTestOptions()
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestOptions`.

### getViewBinding

```
abstract @NonNull ViewBinding getViewBinding()
```

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

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ViewBinding`

### installation

```
abstract void installation(
    @ExtensionFunctionType @NonNull Function1<@NonNull Installation, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AdbOptions`.

### jacoco

```
@Incubating
abstract void [jacoco](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#jacoco(kotlin.Function1))(
    @ExtensionFunctionType @NonNull Function1<@NonNull JacocoOptions, Unit> action
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Renamed to testCoverage

Configure the gathering of code-coverage from tests.

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

### lint

```
abstract void lint(@ExtensionFunctionType @NonNull Function1<@NonNull Lint, Unit> action)
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Lint`.

### lintOptions

```
@Incubating
abstract void [lintOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#lintOptions(kotlin.Function1))(
    @ExtensionFunctionType @NonNull Function1<@NonNull LintOptions, Unit> action
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Renamed to lint

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/LintOptions`.

### packaging

```
abstract void packaging(
    @ExtensionFunctionType @NonNull Function1<@NonNull Packaging, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging`.

### packagingOptions

```
abstract void [packagingOptions](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/CommonExtension#packagingOptions(kotlin.Function1))(
    @ExtensionFunctionType @NonNull Function1<@NonNull Packaging, Unit> action
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Renamed to packaging

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Packaging`.

### productFlavors

```
abstract void productFlavors(
    @ExtensionFunctionType @NonNull Function1<@NonNull NamedDomainObjectContainer<@NonNull ProductFlavorT>, Unit> action
)
```

Encapsulates all product flavors configurations for this project.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ProductFlavor`

### release

```
abstract void release(
    @NonNull NamedDomainObjectContainer<@NonNull BuildTypeT> receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull BuildTypeT, Unit> action
)
```

Shortcut extension method to allow easy access to the predefined `release` `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType`

For example:

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

### setBuildToolsVersion

```
abstract void setBuildToolsVersion(@NonNull String buildToolsVersion)
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#buildToolsVersion()`

### setCompileSdk

```
abstract void setCompileSdk(Integer compileSdk)
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdk()`

### setCompileSdkExtension

```
abstract void setCompileSdkExtension(Integer compileSdkExtension)
```

Specifies the SDK Extension level to compile your project against. This value is optional.

When not provided the base extension for the given `compileSdk` API level will be selected.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdkExtension()`

### setCompileSdkPreview

```
abstract void setCompileSdkPreview(String compileSdkPreview)
```

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.

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#compileSdkPreview()`

### setNamespace

```
abstract void setNamespace(String namespace)
```

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.

### setNdkPath

```
abstract void setNdkPath(String ndkPath)
```

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 the version it refers to need to match the one specified in ndkVersion. If ndkVersion is not specified, ndkPath need to match the default ndkVersion

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

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#ndkPath()`

### setNdkVersion

```
abstract void setNdkVersion(@NonNull String ndkVersion)
```

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. If this field is not specified, a default value will be provided depending on the AGP version

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

This can be set on all Gradle projects with `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/SettingsExtension#ndkVersion()`

### setResourcePrefix

```
abstract void setResourcePrefix(String resourcePrefix)
```

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_'
```

### signingConfigs

```
abstract void signingConfigs(
    @ExtensionFunctionType @NonNull Function1<@NonNull NamedDomainObjectContainer<@NonNull ApkSigningConfig>, Unit> action
)
```

Encapsulates signing configurations that you can apply to `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/BuildType` and `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ProductFlavor` configurations.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ApkSigningConfig`.

### sourceSets

```
abstract void sourceSets(
    @ExtensionFunctionType @NonNull Function1<@NonNull NamedDomainObjectContainer<@NonNull AndroidSourceSet>, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/AndroidSourceSet`.

### splits

```
abstract void splits(
    @ExtensionFunctionType @NonNull Function1<@NonNull Splits, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/Splits`.

### testCoverage

```
abstract void testCoverage(
    @ExtensionFunctionType @NonNull Function1<@NonNull TestCoverage, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestCoverage`.

### testOptions

```
@Incubating
abstract void testOptions(
    @ExtensionFunctionType @NonNull Function1<@NonNull TestOptions, Unit> action
)
```

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 `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/TestOptions`.

### useLibrary

```
abstract void useLibrary(@NonNull String name)
```

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 |
|---|---|
| `@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name` | the name of the library. |

### useLibrary

```
abstract void useLibrary(@NonNull String name, boolean required)
```

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, "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. To learn more about Gradle dependencies, read [Dependency Management Basics](https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html)

| Parameters |
|---|---|
| `@https://developer.android.com/reference/tools/gradle-api/8.3/null/androidx/annotation/NonNull https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html name` | the name of the library. |
| `boolean required` | if using the library requires a manifest entry, the entry will indicate that the library is not required. |

### viewBinding

```
abstract void viewBinding(
    @ExtensionFunctionType @NonNull Function1<@NonNull ViewBinding, Unit> action
)
```

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

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/ViewBinding`