Stay organized with collections
Save and categorize content based on your preferences.
DynamicFeatureBuildType
interface DynamicFeatureBuildType : BuildType, 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 properties |
From class com.android.build.api.dsl.BuildType
Boolean |
Specifies code coverage is enabled for module tests of type AndroidTest.
|
Boolean |
Specifies unit test code coverage data collection by configuring the JacocoPlugin.
|
Boolean |
Whether this build type is configured to generate an APK with debuggable native code.
|
Boolean |
Specifies whether to enable code shrinking for this build type.
|
Boolean |
Specifies whether the plugin should generate resources for pseudolocales.
|
Boolean |
Whether the build type is configured to generate an apk with debuggable RenderScript code.
|
Boolean |
Specifies whether to enable shrinking resources for this build type.
|
Boolean |
This property is deprecated. Replaced with: enableUnitTestCoverage and or enableAndroidTestCoverage.
|
Boolean |
This property is deprecated. Changing the value of isZipAlignEnabled no longer has any effect
|
MutableList<String> |
Specifies a sorted list of build types that the plugin should try to use when a direct variant match with a local module dependency is not possible.
|
PostProcessing |
|
Int |
Optimization level to use by the renderscript compiler.
|
|
From class com.android.build.api.dsl.VariantDimension
ExternalNativeBuildOptions |
Encapsulates per-variant CMake and ndk-build configurations for your external native build.
|
JavaCompileOptions |
Options for configuring Java compilation.
|
MutableMap<String, Any> |
The manifest placeholders.
|
File? |
This property is deprecated. This property is deprecated.
|
File? |
Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.
|
Ndk |
Encapsulates per-variant configurations for the NDK, such as ABI filters.
|
Optimization |
|
MutableList<File> |
Specifies the ProGuard configuration files that the plugin should use.
|
Shaders |
Options for configuring the shader compiler.
|
MutableList<File> |
The collection of proguard rule files to be used when processing test code.
|
|
Public properties
isCrunchPngs
var 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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]