ApplicationBuildType
interface ApplicationBuildType : VariantDimension, HasInitWith, BuildType, VariantDimension, ApplicationVariantDimension
Build types define certain properties that Gradle uses when building and packaging your app, and are typically configured for different stages of your development lifecycle.
There are two build types defined by default, debug
and release
, and you can customize them and create additional build types.
The default debug build type enables debug options and signs the APK with the debug key, while the release build type is not debuggable and can be configured to shrink, obfuscate, and sign your APK with a release key for distribution.
See configuring build types for more information.
Summary
Public properties |
|
---|---|
Boolean? |
Whether to crunch PNGs. |
Boolean |
Whether this build type should generate a debuggable apk. |
Boolean |
Whether this product flavor should be selected in Studio by default |
Boolean |
Whether a linked Android Wear app should be embedded in variant using this build type. |
Inherited functions |
||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
|
Public properties
isCrunchPngs
val isCrunchPngs: Boolean?
Whether to crunch PNGs.
Setting this property to true
reduces of PNG resources that are not already optimally compressed. However, this process increases build times.
PNG crunching is enabled by default in the release build type and disabled by default in the debug build type.
isDefault
val isDefault: Boolean
Whether this product flavor should be selected in Studio by default
isEmbedMicroApp
val isEmbedMicroApp: Boolean
Whether a linked Android Wear app should be embedded in variant using this build type.
Wear apps can be linked with the following code:
dependencies {
freeWearApp project(:wear:free') // applies to variant using the free flavor
wearApp project(':wear:base') // applies to all other variants
}