base 'android' extension for plugins that have a test component.
Property | Description |
aaptOptions | Options for aapt, tool for packaging resources. |
adbExecutable | The adb executable from the compile SDK. |
adbOptions | Adb options. |
buildToolsVersion | Required. Version of the build tools to use. |
buildTypes | Build types used by this project. |
compileOptions | Compile options. |
compileSdkVersion | Required. Compile SDK version. |
dataBinding | Data Binding options. |
defaultConfig | Default config, shared by all flavors. |
defaultPublishConfig | Name of the configuration used to build the default artifact of this project. |
dexOptions | Dex options. |
externalNativeBuild | External native build options. |
flavorDimensionList | The names of flavor dimensions. |
generatePureSplits | Whether to generate pure splits or multi apk. |
jacoco | JaCoCo options. |
lintOptions | Lint options. |
ndkDirectory | The NDK directory used. |
packagingOptions | Packaging options. |
productFlavors | All product flavors used by this project. |
publishNonDefault | Whether to publish artifacts for all configurations, not just the default one. |
resourcePrefix | A prefix to be used when creating new resources. Used by Android Studio. |
sdkDirectory | The SDK directory used. |
signingConfigs | Signing configs used by this project. |
sourceSets | All source sets. Note that the Android plugin uses its own implementation of
source sets, |
splits | APK splits options. |
testBuildType | Name of the build type that will be used when running Android (on-device) tests. |
testOptions | Options for running tests. |
testVariants | The list of (Android) test variants. Since the collections is built after evaluation,
it should be used with Gradle's |
unitTestVariants | The list of unit test variants. Since the collections is built after evaluation,
it should be used with Gradle's |
variantFilter | Callback to control which variants should be excluded. |
Method | Description |
flavorDimensions(dimensions) | Specifies names of flavor dimensions. |
useLibrary(name) | Request the use a of Library. The library is then added to the classpath. |
useLibrary(name, required) | Request the use a of Library. The library is then added to the classpath. |
AaptOptions
aaptOptions
Options for aapt, tool for packaging resources.
File
adbExecutable
The adb executable from the compile SDK.
AdbOptions
adbOptions
Adb options.
String
buildToolsVersion
Required. Version of the build tools to use.
Value assigned to this property is parsed and stored in a normalized form, so reading it back may give a slightly different string.
Collection
<BuildType
>
buildTypes
Collection
<BuildType
>Build types used by this project.
CompileOptions
compileOptions
Compile options.
String
compileSdkVersion
Required. Compile SDK version.
Your code will be compiled against the android.jar from this API level. You should generally use the most up-to-date SDK version here. Use the Lint tool to make sure you don't use APIs not available in earlier platform version without checking.
Setter can be called with a string like "android-21" or a number.
Value assigned to this property is parsed and stored in a normalized form, so reading it back may give a slightly different string.
DataBindingOptions
dataBinding
Data Binding options.
ProductFlavor
defaultConfig
Default config, shared by all flavors.
String
defaultPublishConfig
Name of the configuration used to build the default artifact of this project.
DexOptions
dexOptions
Dex options.
ExternalNativeBuild
externalNativeBuild
External native build options.
JacocoOptions
jacoco
JaCoCo options.
LintOptions
lintOptions
Lint options.
File
ndkDirectory
The NDK directory used.
PackagingOptions
packagingOptions
Packaging options.
Collection
<ProductFlavor
>
productFlavors
Collection
<ProductFlavor
>All product flavors used by this project.
Whether to publish artifacts for all configurations, not just the default one.
String
resourcePrefix
A prefix to be used when creating new resources. Used by Android Studio.
File
sdkDirectory
The SDK directory used.
Collection
<SigningConfig
>
signingConfigs
Collection
<SigningConfig
>Signing configs used by this project.
NamedDomainObjectContainer
<AndroidSourceSet
>
sourceSets
NamedDomainObjectContainer
<AndroidSourceSet
>All source sets. Note that the Android plugin uses its own implementation of
source sets, AndroidSourceSet
.
String
testBuildType
Name of the build type that will be used when running Android (on-device) tests.
Defaults to "debug".
TestOptions
testOptions
Options for running tests.
DomainObjectSet
<TestVariant
>
testVariants
DomainObjectSet
<TestVariant
>The list of (Android) test variants. Since the collections is built after evaluation,
it should be used with Gradle's all
iterator to process future items.
DomainObjectSet
<UnitTestVariant
>
unitTestVariants
DomainObjectSet
<UnitTestVariant
>The list of unit test variants. Since the collections is built after evaluation,
it should be used with Gradle's all
iterator to process future items.
Action
<VariantFilter
>
variantFilter
Action
<VariantFilter
>Callback to control which variants should be excluded.
The Action
is passed a single object of type VariantFilter
.
It should set the VariantFilter.setIgnore()
flag to filter out the
given variant.
void
flavorDimensions
(String
...
dimensions)
String
...Specifies names of flavor dimensions.
void
useLibrary
(String
name)
Request the use a of Library. The library is then added to the classpath.
void
useLibrary
(String
name, boolean
required)
Request the use a of Library. The library is then added to the classpath.