BuildType

API Documentation:BuildType

DSL object to configure build types.

Properties

PropertyDescription
applicationIdSuffix

Application id suffix applied to this build type.

debuggable

Whether this build type should generate a debuggable apk.

jniDebuggable

Whether this build type is configured to generate an APK with debuggable native code.

minifyEnabled

Whether Minify is enabled for this build type.

multiDexEnabled

Whether Multi-Dex is enabled for this variant.

renderscriptDebuggable

Whether the build type is configured to generate an apk with debuggable RenderScript code.

renderscriptOptimLevel

Optimization level to use by the renderscript compiler.

signingConfig

The signing configuration.

versionNameSuffix

Version name suffix.

zipAlignEnabled

Whether zipalign is enabled for this build type.

Methods

MethodDescription
proguardFile(proguardFile)

Adds a new ProGuard configuration file.

proguardFiles(proguardFileArray)

Adds new ProGuard configuration files.

setProguardFiles(proguardFileIterable)

Sets the ProGuard configuration files.

Script blocks

No script blocks

Property details

String applicationIdSuffix

Application id suffix applied to this build type.

boolean debuggable

Whether this build type should generate a debuggable apk.

boolean jniDebuggable

Whether this build type is configured to generate an APK with debuggable native code.

boolean minifyEnabled

Whether Minify is enabled for this build type.

Boolean multiDexEnabled

Whether Multi-Dex is enabled for this variant.

boolean renderscriptDebuggable

Whether the build type is configured to generate an apk with debuggable RenderScript code.

int renderscriptOptimLevel

Optimization level to use by the renderscript compiler.

SigningConfig signingConfig (read-only)

The signing configuration.

String versionNameSuffix

Version name suffix.

boolean zipAlignEnabled

Whether zipalign is enabled for this build type.

Method details

BuildType proguardFile(Object proguardFile)

Adds a new ProGuard configuration file.

proguardFile getDefaultProguardFile('proguard-android.txt')

There are 2 default rules files

  • proguard-android.txt
  • proguard-android-optimize.txt

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.

BuildType proguardFiles(Object... proguardFileArray)

Adds new ProGuard configuration files.

BuildType setProguardFiles(Iterable<?> proguardFileIterable)

Sets the ProGuard configuration files.