Base 'android' extension for all android plugins.
This is never used directly. Instead,
Type | Name and description |
---|---|
AaptOptions |
aaptOptions Options for aapt, tool for packaging resources. |
org.gradle.api.NamedDomainObjectContainer<BuildType> |
buildTypes Build types used by this project. |
CompileOptions |
compileOptions Compile options |
ProductFlavor |
defaultConfig Default config, shared by all flavors. |
DexOptions |
dexOptions Dex options. |
List<String> |
flavorDimensionList |
boolean |
generatePureSplits |
JacocoExtension |
jacoco JaCoCo options. |
LintOptions |
lintOptions Lint options. |
PackagingOptions |
packagingOptions Packaging options. |
org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor> |
productFlavors All product flavors used by this project. |
String |
resourcePrefix A prefix to be used when creating new resources. |
org.gradle.api.NamedDomainObjectContainer<SigningConfig> |
signingConfigs Signing configs used by this project. |
org.gradle.api.NamedDomainObjectContainer<AndroidSourceSet> |
sourceSetsContainer The source sets container. |
Splits |
splits APK splits |
String |
testBuildType |
TestOptions |
testOptions Options for running tests. |
Constructor and description |
---|
BaseExtension
(BasePlugin plugin, org.gradle.api.internal.project.ProjectInternal project, org.gradle.internal.reflect.Instantiator instantiator, org.gradle.api.NamedDomainObjectContainer<BuildType> buildTypes, org.gradle.api.NamedDomainObjectContainer<GroupableProductFlavor> productFlavors, org.gradle.api.NamedDomainObjectContainer<SigningConfig> signingConfigs, boolean isLibrary) |
Type | Name and description |
---|---|
void |
aaptOptions(org.gradle.api.Action<AaptOptions> action) Configures aapt options. |
void |
addTestVariant(TestVariant testVariant) |
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. |
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 static 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 |
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() |
com.android.utils.ILogger |
getLogger() |
protected def |
getPlugin() |
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() |
org.gradle.api.internal.DefaultDomainObjectSet<TestVariant> |
getTestVariants() Returns the list of test variants. |
boolean |
getUseNewNativePlugin() |
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, org.gradle.api.artifacts.Configuration configuration, File classesFolder, 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 |
setUseNewNativePlugin(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.
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 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.
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.
Returns 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 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.0.0