Base 'android' extension for all android plugins.
This is never used directly. Instead,
| Type | Name and description |
|---|---|
AaptOptions |
aaptOptionsOptions for aapt, tool for packaging resources. |
AdbOptions |
adbOptionsAdb options |
org.gradle.api.NamedDomainObjectContainer<BuildType> |
buildTypesBuild types used by this project. |
CompileOptions |
compileOptionsCompile options |
ProductFlavor |
defaultConfigDefault config, shared by all flavors. |
DexOptions |
dexOptionsDex options. |
List<String> |
flavorDimensionList |
boolean |
generatePureSplits |
JacocoExtension |
jacocoJaCoCo options. |
LintOptions |
lintOptionsLint options. |
PackagingOptions |
packagingOptionsPackaging options. |
org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor> |
productFlavorsAll product flavors used by this project. |
String |
resourcePrefixA prefix to be used when creating new resources. |
org.gradle.api.NamedDomainObjectContainer<SigningConfig> |
signingConfigsSigning configs used by this project. |
org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet> |
sourceSetsContainerThe source sets container. |
Splits |
splitsAPK splits |
TestOptions |
testOptionsOptions for running tests. |
| Constructor and description |
|---|
BaseExtension
(org.gradle.api.internal.project.ProjectInternal project, org.gradle.internal.reflect.Instantiator instantiator, AndroidBuilder androidBuilder, SdkHandler sdkHandler, org.gradle.api.NamedDomainObjectContainer<BuildType> buildTypes, org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor> productFlavors, org.gradle.api.NamedDomainObjectContainer<SigningConfig> signingConfigs, ExtraModelInfo extraModelInfo, boolean isLibrary) |
| Type | Name and description |
|---|---|
void |
aaptOptions(org.gradle.api.Action<AaptOptions> action)Configures aapt options. |
void |
adbOptions(org.gradle.api.Action<AdbOptions> action)Configures adb options. |
void |
addVariant(BaseVariant variant) |
void |
buildToolsVersion(String version) |
void |
buildTypes(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<BuildType>> action)Configures the build types. |
protected def |
checkWritability() |
void |
compileOptions(org.gradle.api.Action<CompileOptions> action)Configures compile options. |
void |
compileSdkVersion(String version)Sets the compile SDK version, based on full SDK version string, e.g. |
void |
compileSdkVersion(int apiLevel)Sets the compile SDK version, based on API level, e.g. 21 for Lollipop. |
protected void |
createConfiguration(org.gradle.api.artifacts.ConfigurationContainer configurations, String configurationName, String configurationDescription) |
void |
defaultConfig(org.gradle.api.Action<ProductFlavor> action)The default configuration, inherited by all build flavors (if any are defined). |
void |
defaultPublishConfig(String value) |
void |
deviceProvider(com.android.builder.testing.api.DeviceProvider deviceProvider) |
void |
dexOptions(org.gradle.api.Action<DexOptions> action)Configures dex options. |
void |
disableWrite()Disallow further modification on the extension. |
void |
enforceUniquePackageName(boolean value) |
void |
flavorDimensions(String... dimensions) |
void |
generatePureSplits(boolean flag) |
File |
getAdbExe() |
List<File> |
getBootClasspath() |
com.android.sdklib.repository.FullRevision |
getBuildToolsRevision() |
String |
getBuildToolsVersion()Required. |
String |
getCompileSdkVersion()Required. |
File |
getDefaultProguardFile(String name) |
String |
getDefaultPublishConfig()Name of the configuration used to build the default artifact of this project. |
List<com.android.builder.testing.api.DeviceProvider> |
getDeviceProviders() |
def |
getEnforceUniquePackageName() |
File |
getNdkDirectory() |
boolean |
getPublishNonDefault()Whether to publish artifacts for all configurations, not just the default one. |
File |
getSdkDirectory() |
org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet> |
getSourceSets()All source sets. |
List<com.android.builder.testing.api.TestServer> |
getTestServers() |
Closure<Void> |
getVariantFilter()A variant filter to control which variant are excluded. |
void |
jacoco(org.gradle.api.Action<JacocoExtension> action)Configures JaCoCo options. |
void |
lintOptions(org.gradle.api.Action<LintOptions> action)Configure lint options. |
void |
packagingOptions(org.gradle.api.Action<PackagingOptions> action)Configures packaging options. |
void |
productFlavors(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor>> action)Configures the product flavors. |
void |
publishNonDefault(boolean value) |
void |
registerArtifactType(String name, boolean isTest, int artifactType) |
void |
registerBuildTypeSourceProvider(String name, BuildType buildType, com.android.builder.model.SourceProvider sourceProvider) |
void |
registerJavaArtifact(String name, BaseVariant variant, String assembleTaskName, String javaCompileTaskName, Collection<File> generatedSourceFolders, Iterable<String> ideSetupTaskNames, org.gradle.api.artifacts.Configuration configuration, File classesFolder, File javaResourceFolder, com.android.builder.model.SourceProvider sourceProvider) |
void |
registerMultiFlavorSourceProvider(String name, String flavorName, com.android.builder.model.SourceProvider sourceProvider) |
void |
registerProductFlavorSourceProvider(String name, ProductFlavor productFlavor, com.android.builder.model.SourceProvider sourceProvider) |
void |
resourcePrefix(String prefix) |
void |
setBuildToolsVersion(String version) |
void |
setCompileSdkVersion(int apiLevel) |
void |
setCompileSdkVersion(String target) |
void |
setDefaultPublishConfig(String value) |
void |
setEnforceUniquePackageName(boolean value) |
void |
setVariantFilter(Closure<Void> filter)Sets a variant filter to control which variant are excluded. |
void |
signingConfigs(org.gradle.api.Action<? super org.gradle.api.NamedDomainObjectContainer<SigningConfig>> action)Configures the signing configs. |
void |
sourceSets(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet>> action)Configures the source sets. |
void |
splits(org.gradle.api.Action<Splits> action)Configures APK splits. |
void |
testOptions(org.gradle.api.Action<TestOptions> action)Configures the test options. |
void |
testServer(com.android.builder.testing.api.TestServer testServer) |
void |
variantFilter(Closure<Void> filter)Sets a variant filter to control which variant are excluded. |
com.android.builder.model.SourceProvider |
wrapJavaSourceSet(org.gradle.api.tasks.SourceSet sourceSet) |
Options for aapt, tool for packaging resources.
Adb options
Build types used by this project.
Compile options
Default config, shared by all flavors.
Dex options.
JaCoCo options.
Lint options.
Packaging options.
All product flavors used by this project.
A prefix to be used when creating new resources. Used by Studio
Signing configs used by this project.
The source sets container.
APK splits
Options for running tests.
Configures aapt options.
Configures adb options.
Configures the build types.
Configures compile options.
Sets the compile SDK version, based on full SDK version string, e.g.
android-21 for Lollipop.
Sets the compile SDK version, based on API level, e.g. 21 for Lollipop.
The default configuration, inherited by all build flavors (if any are defined).
Configures dex options.
Disallow further modification on the extension.
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.
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.
Name of the configuration used to build the default artifact of this project.
Whether to publish artifacts for all configurations, not just the default one.
All source sets. Note that the Android plugin uses its own implementation of source sets, AndroidSourceSet.
A variant filter to control which variant are excluded. The filter is a closure which is passed a single object of type VariantFilter
Configures JaCoCo options.
Configure lint options.
Configures packaging options.
Configures the product flavors.
Sets a variant filter to control which variant are excluded. The closure is passed a single object of type VariantFilter
filter - the filter as a closureConfigures the signing configs.
Configures the source sets. Note that the Android plugin uses its own implementation of source sets, AndroidSourceSet.
Configures APK splits.
Configures the test options.
Sets a variant filter to control which variant are excluded. The closure is passed a single object of type VariantFilter
filter - the filter as a closureGradle API 1.2.0