Android Plugin DSL Reference

Version 3.0.0


This is the DSL reference for Android Gradle Plugin.

Start reading by finding the right extension type for the plugin you are using, e.g. AppExtension.

Extension types

Listed below are the Gradle extension types used by respective plugins:


The android extension for projects.


The android extension for projects.


android extension for projects.


The android extension for projects.

Configuration blocks

Listed below are the configuration blocks available within android

aaptOptions { }

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

adbOptions { }

Specifies options for the Android Debug Bridge (ADB), such as APK installation options.

buildTypes { }

Encapsulates all build type configurations for this project.

compileOptions { }

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

dataBinding { }

Specifies options for the Data Binding Library.

defaultConfig { }

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

dexOptions { }

Specifies options for the DEX tool, such as enabling library pre-dexing.

externalNativeBuild { }

Configures external native build using CMake or ndk-build.

jacoco { }

Configuring JaCoCo using this block is deprecated.

lintOptions { }

Specifies options for the lint tool.

packagingOptions { }

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

productFlavors { }

Encapsulates all product flavors configurations for this project.

signingConfigs { }

Encapsulates signing configurations that you can apply to BuildType and ProductFlavor configurations.

sourceSets { }

Encapsulates source set configurations for all variants.

splits { }

Specifies configurations for building multiple APKs or APK splits.

testOptions { }

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