Android 12 Developer Preview is here! Try it out, and give us your feedback!

ApplicationVariant

@Incubating interface ApplicationVariant : Variant, ProducesDex<Dexing>, HasAndroidTest
com.android.build.api.variant.ApplicationVariant

Properties for the main Variant of an application.

Summary

Public methods

abstract Unit
aaptOptions(action: Aapt.() -> Unit)

Variant's aaptOptions, initialized by the corresponding global DSL element.

abstract Unit
packaging(action: ApkPackaging.() -> Unit)

Variant's packagingOptions, initialized by the corresponding global DSL element.

abstract Unit
signingConfig(action: SigningConfig.() -> Unit)

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

Inherited functions

Properties

abstract Aapt

Variant's aaptOptions, initialized by the corresponding global DSL element.

abstract Property<String>

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

abstract DependenciesInfo

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

abstract List<VariantOutput>

Returns the final list of variant outputs.

abstract ApkPackaging

Variant's packagingOptions, initialized by the corresponding global DSL element.

abstract SigningConfig

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

Inherited properties

Public methods

aaptOptions

abstract fun aaptOptions(action: Aapt.() -> Unit): Unit

Variant's aaptOptions, initialized by the corresponding global DSL element.

packaging

abstract fun packaging(action: ApkPackaging.() -> Unit): Unit

Variant's packagingOptions, initialized by the corresponding global DSL element.

signingConfig

abstract fun signingConfig(action: SigningConfig.() -> Unit): Unit

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

Properties

aapt

abstract val aapt: Aapt

Variant's aaptOptions, initialized by the corresponding global DSL element.

applicationId

abstract val applicationId: Property<String>

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

dependenciesInfo

abstract val dependenciesInfo: DependenciesInfo

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

outputs

abstract val outputs: List<VariantOutput>

Returns the final list of variant outputs.

Return
read only list of VariantOutput for this variant.

packaging

abstract val packaging: ApkPackaging

Variant's packagingOptions, initialized by the corresponding global DSL element.

signingConfig

abstract val signingConfig: SigningConfig

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