DynamicFeatureBuildType

interface DynamicFeatureBuildType : VariantDimension, HasInitWith, BuildType, VariantDimension, DynamicFeatureVariantDimension


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.

Dynamic features must have exactly the same build types (by name) as the app that includes them, however settings can be different between the application and the dynamic feature. Properties on dynamic feature build types fall in to three categories.

  • Properties global to the application that affect the build flow, and so must be explicitly set in the dynamic feature. For example, whether the build type is debuggable must match the application that includes this dynamic feature.

  • Properties global to the application that do not affect the build flow. These are set in the com.android.application project, and are automatically configured on the dynamic feature, they cannot be set on the dynamic feature. For example, application ID suffix and signing cannot be configured on the dynamic feature and are not present on this interface.

  • Properties that can vary between the app and the dynamic feature. For example, resValues can be used independently from the app in a dynamic feature.

See ApplicationProductFlavor

Summary

Public properties

Boolean?

Whether to crunch PNGs.

Inherited functions

From class BuildType
@Incubating Unit

Copies all properties from the given build type.

@Incubating Unit
@Incubating Unit

This function is deprecated. Replaced with property matchingFallbacks

@Incubating Unit
setMatchingFallbacks(vararg fallbacks: String?)

This function is deprecated. Replaced with property matchingFallbacks

From class ExtensionAware
From class Named
From class VariantDimension
@Incubating Unit
addManifestPlaceholders(manifestPlaceholders: Map<String?, Any?>?)

Adds manifest placeholders.

@Incubating Unit
buildConfigField(type: String?, name: String?, value: String?)

Adds a new field to the generated BuildConfig class.

@Incubating Unit

Encapsulates per-variant CMake and ndk-build configurations for your external native build.

Unit

Options for configuring Java compilation.

@Incubating Unit
ndk(action: (@ExtensionFunctionType Ndk.() -> Unit)?)

Encapsulates per-variant configurations for the NDK, such as ABI filters.

@Incubating Unit
@Incubating Any
proguardFile(proguardFile: Any?)

Adds a new ProGuard configuration file.

@Incubating Any
proguardFiles(vararg files: Any?)

Adds new ProGuard configuration files.

@Incubating Unit
resValue(type: String?, name: String?, value: String?)

Adds a new generated resource.

@Incubating Void?
setManifestPlaceholders(manifestPlaceholders: Map<String?, Any?>?)

This function is deprecated. Use manifestPlaceholders property instead

@Incubating Any
setProguardFiles(proguardFileIterable: Iterable<*>?)

Replaces the ProGuard configuration files.

@Incubating Unit

Configure the shader compiler options.

@Incubating Any
testProguardFile(proguardFile: Any?)

Adds a proguard rule file to be used when processing test code.

@Incubating Any
testProguardFiles(vararg proguardFiles: Any?)

Adds proguard rule files to be used when processing test code.

Public properties

isCrunchPngs

val isCrunchPngsBoolean?

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.