Android Plugin DSL Reference

Version 1.4.0-beta1

Introduction

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:

TypeDescription
AppExtension

android extension for com.android.application projects.

LibraryExtension

android extension for com.android.library projects.

TestExtension

android extension for com.android.test projects.

Configuration blocks

Listed below are the configuration blocks available within android

BlockDescription
defaultConfig { }

The default configuration, inherited by all product flavors (if any are defined).

aaptOptions { }

Configures aapt options.

adbOptions { }

Configures adb options.

buildTypes { }

Configures build types.

compileOptions { }

Configures compile options.

dexOptions { }

Configures dex options.

jacoco { }

Configures JaCoCo options.

lintOptions { }

Configures lint options.

packagingOptions { }

Configures packaging options.

productFlavors { }

Configures product flavors.

signingConfigs { }

Configures signing configs.

sourceSets { }

Configures source sets.

splits { }

Configures APK splits.

testOptions { }

Configures test options.