public class VariantManager extends Object
Class to create, manage variants.
Modifiers | Name | Description |
---|---|---|
protected static String |
COM_ANDROID_SUPPORT_MULTIDEX |
Constructor and description |
---|
VariantManager
(org.gradle.api.Project project, AndroidBuilder androidBuilder, BaseExtension extension, VariantFactory variantFactory, TaskManager taskManager, org.gradle.internal.reflect.Instantiator instantiator) |
Type | Name and description |
---|---|
void |
addBuildType(BuildType buildType) Adds new BuildType, creating a BuildTypeData, and the associated source set, and adding it to the map. |
void |
addProductFlavor(GroupableProductFlavor productFlavor) Adds a new ProductFlavor, creating a ProductFlavorData and associated source sets, and adding it to the map. |
void |
addSigningConfig(SigningConfig signingConfig) |
void |
createAndroidTasks() Variant/Task creation entry point. |
void |
createApiObjects() |
void |
createTasksForVariantData(TaskFactory tasks, BaseVariantData<? extends BaseVariantOutputData> variantData) Create tasks for the specified variantData. |
TestVariantData |
createTestVariantData(BaseVariantData testedVariantData, VariantType type) Create a TestVariantData for the specified testedVariantData. |
BaseVariantData<? extends BaseVariantOutputData> |
createVariantData(com.android.builder.model.BuildType buildType, List<? extends def> productFlavorList) Create a VariantData for a specific combination of BuildType and GroupableProductFlavor list. |
Map<String, BuildTypeData> |
getBuildTypes() |
ProductFlavorData<ProductFlavor> |
getDefaultConfig() |
Map<String, ProductFlavorData<GroupableProductFlavor>> |
getProductFlavors() |
Map<String, SigningConfig> |
getSigningConfigs() |
List<BaseVariantData<? extends BaseVariantOutputData>> |
getVariantDataList() Return a list of all created VariantData. |
void |
populateVariantDataList() Create all variants. |
Adds new BuildType, creating a BuildTypeData, and the associated source set, and adding it to the map.
buildType
- the build type.Adds a new ProductFlavor, creating a ProductFlavorData and associated source sets, and adding it to the map.
productFlavor
- the product flavorVariant/Task creation entry point.
Create tasks for the specified variantData.
Create a TestVariantData for the specified testedVariantData.
Create a VariantData for a specific combination of BuildType and GroupableProductFlavor list.
Return a list of all created VariantData.
Create all variants.