| API Documentation: | BaseExtension |
|---|
Base 'android' extension for all android plugins.
This is never used directly. Instead,
- Plugin 'com.android.application' uses
AppExtension - Plugin 'com.android.library' uses
LibraryExtension
| Property | Description |
aaptOptions | Options for aapt, tool for packaging resources. |
buildToolsVersion | Required. Version of the build tools to use. |
buildTypes | Build types used by this project. |
compileOptions | Compile options |
compileSdkVersion | Required. Compile SDK version. |
defaultConfig | Default config, shared by all flavors. |
defaultPublishConfig | Name of the configuration used to build the default artifact of this project. |
dexOptions | Dex options. |
jacoco | JaCoCo options. |
lintOptions | Lint options. |
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 Studio |
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 |
testOptions | Options for running tests. |
testVariants | The list of test variants. Since the collections is built after evaluation,
it should be used with Groovy's |
variantFilter | A variant filter to control which variant are excluded. The filter is a closure which
is passed a single object of type |
| Block | Description |
aaptOptions | Configures aapt options. |
buildTypes | Configures the build types. |
compileOptions | Configures compile options. |
defaultConfig | The default configuration, inherited by all build flavors (if any are defined). |
dexOptions | Configures dex options. |
jacoco | Configures JaCoCo options. |
lintOptions | Configure lint options. |
packagingOptions | Configures packaging options. |
productFlavors | Configures the product flavors. |
signingConfigs | Configures the signing configs. |
sourceSets | Configures the source sets. Note that the Android plugin uses its own implementation of
source sets, |
splits | Configures APK splits. |
testOptions | Configures the test options. |
AaptOptions aaptOptions (read-only)
Options for aapt, tool for packaging resources.
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.
org.gradle.api.NamedDomainObjectContainer<BuildType> buildTypes (read-only)
org.gradle.api.NamedDomainObjectContainer<BuildType>Build types used by this project.
CompileOptions compileOptions (read-only)
Compile options
String compileSdkVersion
Required. Compile SDK version.
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.
ProductFlavor defaultConfig (read-only)
Default config, shared by all flavors.
String defaultPublishConfig
Name of the configuration used to build the default artifact of this project.
DexOptions dexOptions (read-only)
Dex options.
JacocoExtension jacoco (read-only)
JaCoCo options.
LintOptions lintOptions (read-only)
Lint options.
PackagingOptions packagingOptions (read-only)
Packaging options.
org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor> productFlavors (read-only)
org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor>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 Studio
org.gradle.api.NamedDomainObjectContainer<SigningConfig> signingConfigs (read-only)
org.gradle.api.NamedDomainObjectContainer<SigningConfig>Signing configs used by this project.
org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet> sourceSets (read-only)
org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet>All source sets. Note that the Android plugin uses its own implementation of
source sets, AndroidSourceSet.
Splits splits (read-only)
APK splits
TestOptions testOptions (read-only)
Options for running tests.
org.gradle.api.internal.DefaultDomainObjectSet<TestVariant> testVariants (read-only)
org.gradle.api.internal.DefaultDomainObjectSet<TestVariant>The list of test variants. Since the collections is built after evaluation,
it should be used with Groovy's all iterator to process future items.
A variant filter to control which variant are excluded. The filter is a closure which
is passed a single object of type VariantFilter
Configures the build types.
- Delegates to:
fromorg.gradle.api.NamedDomainObjectContainer<BuildType>buildTypes
The default configuration, inherited by all build flavors (if any are defined).
- Delegates to:
ProductFlavorfromdefaultConfig
Configures packaging options.
- Delegates to:
PackagingOptionsfrompackagingOptions
Configures the product flavors.
- Delegates to:
fromorg.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor>productFlavors
Configures the signing configs.
- Delegates to:
fromorg.gradle.api.NamedDomainObjectContainer<SigningConfig>signingConfigs
Configures the source sets. Note that the Android plugin uses its own implementation of
source sets, AndroidSourceSet.
- Delegates to:
fromorg.gradle.api.NamedDomainObjectContainer<AndroidSourceSet>sourceSets