ApplicationVariant

interface ApplicationVariant : GeneratesApk, ComponentIdentity, Component, HasAndroidResources, Variant, HasAndroidTest, HasTestFixtures


Properties for the main Variant of an application.

Summary

Public properties

Property<String>

Variant's application ID as present in the final manifest file of the APK.

BundleConfig

Variant's information related to the bundle creation configuration.

DependenciesInfo

Specify whether to include SDK dependency information in APKs and Bundles.

List<VariantOutput>

Returns the final list of variant outputs.

SigningConfig

Variant's signingConfig, initialized by the corresponding DSL element.

Inherited functions

From class Component
Unit

This function is deprecated. Use the instrumentation block.

Unit
<ParamT : InstrumentationParameters?> transformClassesWith(
    classVisitorFactoryImplClass: Class<AsmClassVisitorFactory<ParamT?>?>?,
    scope: InstrumentationScope?,
    instrumentationParamsConfig: ((ParamT) -> Unit)?
)

This function is deprecated. Use the instrumentation block.

From class HasAndroidResources
ResValue.Key
makeResValueKey(type: String?, name: String?)

Make a ResValue.Key to interact with resValues's MapProperty

From class Variant
T?
<T : Any?> getExtension(type: Class<T?>?)

Returns an extension object registered via the VariantBuilder.registerExtension API or null if none were registered under the passed type.

Public properties

applicationId

val applicationIdProperty<String>

Variant's application ID as present in the final manifest file of the APK.

Setting this value will override anything set via the DSL with com.android.build.api.dsl.ApplicationBaseFlavor.applicationId, and com.android.build.api.dsl.ApplicationVariantDimension.applicationIdSuffix

bundleConfig

val bundleConfigBundleConfig

Variant's information related to the bundle creation configuration.

Returns
BundleConfig

Variant's BundleConfig.

dependenciesInfo

val dependenciesInfoDependenciesInfo

Specify whether to include SDK dependency information in APKs and Bundles.

outputs

val outputsList<VariantOutput>

Returns the final list of variant outputs.

Returns
List<VariantOutput>

read only list of VariantOutput for this variant.

signingConfig

val signingConfigSigningConfig

Variant's signingConfig, initialized by the corresponding DSL element.

Returns
SigningConfig

Variant's config or null if the variant is not configured for signing.