DSL object used to configure product flavors.
Constructor and description |
---|
ProductFlavor
(String name, org.gradle.api.Project project, org.gradle.internal.reflect.Instantiator instantiator, org.gradle.api.logging.Logger logger) |
Type | Name and description |
---|---|
void |
buildConfigField(String type, String name, String value) |
void |
consumerProguardFiles(Object... proguardFileArray) |
NdkConfig |
getNdkConfig() |
SigningConfig |
getSigningConfig() Signing config used by this product flavor. |
Boolean |
getUseJack() |
void |
maxSdkVersion(int targetSdkVersion) |
void |
minSdkVersion(int minSdkVersion) Sets minimum SDK version. |
void |
minSdkVersion(String minSdkVersion) Sets minimum SDK version. |
void |
ndk(org.gradle.api.Action<NdkOptions> action) |
void |
proguardFile(Object proguardFile) Adds a new ProGuard configuration file. |
void |
proguardFiles(Object... proguardFileArray) Adds new ProGuard configuration files. |
void |
resConfig(String config) |
void |
resConfigs(String... config) |
void |
resConfigs(Collection<String> config) |
void |
resValue(String type, String name, String value) |
void |
setConsumerProguardFiles(Iterable<?> proguardFileIterable) |
void |
setMinSdkVersion(int minSdkVersion) |
void |
setMinSdkVersion(String minSdkVersion) |
void |
setProguardFiles(Iterable<?> proguardFileIterable) Sets the ProGuard configuration files. |
com.android.builder.model.ProductFlavor |
setTargetSdkVersion(int targetSdkVersion) |
void |
setTargetSdkVersion(String targetSdkVersion) |
void |
setUseJack(Boolean useJack) |
void |
targetSdkVersion(int targetSdkVersion) Sets the target SDK version to the given value. |
void |
targetSdkVersion(String targetSdkVersion) Sets the target SDK version to the given value. |
void |
useJack(Boolean useJack) |
Signing config used by this product flavor.
Sets minimum SDK version.
Sets minimum SDK version.
Adds a new ProGuard configuration file.
proguardFile getDefaultProguardFile('proguard-android.txt')
There are 2 default rules files
They are located in the SDK. Using getDefaultProguardFile(String filename)
will return the
full path to the files. They are identical except for enabling optimizations.
Adds new ProGuard configuration files.
Sets the ProGuard configuration files.
Sets the target SDK version to the given value.
Sets the target SDK version to the given value.