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
.
Listed below are the Gradle extension types used by respective plugins:
Type | Description |
AppExtension | The |
LibraryExtension | The |
TestExtension |
|
FeatureExtension | The |
Listed below are the configuration blocks available within android
Block | Description |
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 { } | |
jacoco { } | Configure JaCoCo version that is used for offline instrumentation and coverage report. |
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 |
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. |