class BuildType extends DefaultBuildType
DSL object to configure build types.
| Type | Name and description |
|---|---|
protected void |
_initWith(com.android.builder.model.BaseConfig that) |
void |
buildConfigField(String type, String name, String value)Adds a new field to the generated BuildConfig class. |
BuildType |
consumerProguardFiles(Object... proguardFileArray) |
boolean |
equals(def o) |
CoreNdkOptions |
getNdkConfig() |
SigningConfig |
getSigningConfig()The signing configuration. |
Boolean |
getUseJack()Whether the experimental Jack toolchain should be used. |
int |
hashCode() |
void |
init(SigningConfig debugSigningConfig)Initialize the DSL object. |
void |
jarJarRuleFile(Object file) |
void |
jarJarRuleFiles(Object... files) |
void |
ndk(org.gradle.api.Action<NdkOptions> action) |
BuildType |
proguardFile(Object proguardFile)Adds a new ProGuard configuration file. |
BuildType |
proguardFiles(Object... proguardFileArray)Adds new ProGuard configuration files. |
void |
resValue(String type, String name, String value)Adds a new generated resource. |
BuildType |
setConsumerProguardFiles(Iterable<?> proguardFileIterable)Specifies a proguard rule file to be included in the published AAR. |
BuildType |
setProguardFiles(Iterable<?> proguardFileIterable)Sets the ProGuard configuration files. |
void |
setUseJack(Boolean useJack)Whether the experimental Jack toolchain should be used. |
void |
shrinkResources(boolean flag)Whether shrinking of unused resources is enabled. |
BuildType |
testProguardFile(Object proguardFile)Specifies a proguard rule file to be included in the published AAR. |
BuildType |
testProguardFiles(Object... proguardFileArray)Adds new ProGuard configuration files. |
void |
useJack(Boolean useJack)Whether the experimental Jack toolchain should be used. |
Whether shrinking of unused resources is enabled. Default is false;
Adds a new field to the generated BuildConfig class.
The field is generated as: <type> <name> = <value>;
This means each of these must have valid Java content. If the type is a String, then the value should include quotes.
type - the type of the fieldname - the name of the fieldvalue - the value of the fieldThe signing configuration.
Whether the experimental Jack toolchain should be used.
Initialize the DSL object. Not meant to be used from the build scripts.
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.
Adds a new generated resource.
type - the type of the resourcename - the name of the resourcevalue - the value of the resourceSpecifies a proguard rule file to be included in the published AAR. This proguard rule file will then be used by any application project that consume the AAR (if proguard is enabled). This allows AAR to specify shrinking or obfuscation exclude rules. This is only valid for Library project. This is ignored in Application project.
Sets the ProGuard configuration files.
Whether the experimental Jack toolchain should be used.
Whether shrinking of unused resources is enabled. Default is false;
Specifies a proguard rule file to be included in the published AAR. This proguard rule file will then be used by any application project that consume the AAR (if proguard is enabled). This allows AAR to specify shrinking or obfuscation exclude rules. This is only valid for Library project. This is ignored in Application project.
Adds new ProGuard configuration files.
Whether the experimental Jack toolchain should be used.
Gradle API 1.3.1