ApplicationVariantDimension

interface ApplicationVariantDimension : VariantDimension

Known direct subclasses
ApplicationBaseFlavor
ApplicationBuildType

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.

Known indirect subclasses
ApplicationDefaultConfig

Specifies defaults for properties that the Android application plugin applies to all build variants.

ApplicationProductFlavor

Encapsulates all product flavors properties for application projects.


Shared properties between DSL objects that contribute to an application variant.

That is, ApplicationBuildType and ApplicationProductFlavor and ApplicationDefaultConfig.

Summary

Public properties

String?

Application id suffix.

Boolean?

Returns whether multi-dex is enabled.

ApkSigningConfig?

The associated signing config or null if none are set on the variant dimension.

String?

Version name suffix.

Inherited functions

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 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

applicationIdSuffix

val applicationIdSuffixString?

Application id suffix. It is appended to the "base" application id when calculating the final application id for a variant.

In case there are product flavor dimensions specified, the final application id suffix will contain the suffix from the default product flavor, followed by the suffix from product flavor of the first dimension, second dimension and so on. All of these will have a dot in between e.g. "defaultSuffix.dimension1Suffix.dimensions2Suffix".

multiDexEnabled

val multiDexEnabledBoolean?

Returns whether multi-dex is enabled.

This can be null if the flag is not set, in which case the default value is used.

signingConfig

val signingConfigApkSigningConfig?

The associated signing config or null if none are set on the variant dimension.

versionNameSuffix

val versionNameSuffixString?

Version name suffix. It is appended to the "base" version name when calculating the final version name for a variant.

In case there are product flavor dimensions specified, the final version name suffix will contain the suffix from the default product flavor, followed by the suffix from product flavor of the first dimension, second dimension and so on.