VariantOutput

Added in 4.2.0

interface VariantOutput : VariantOutputConfiguration


Defines a variant output.

This only applies to APKs as AARs and Bundles (AABs) do not support multiple outputs.

See https://developer.android.com/studio/build/configure-apk-splits.html for more information on multiple APK support.

See also
Splits

Summary

Public properties

Property<Boolean>

This property is deprecated. Replaced by enabled

Property<Boolean>

Flag controlling whether the output is enabled.

Property<Int>

The version code for this output.

Property<String>

The version name for this output.

Public properties

enable

Added in 4.2.0
Deprecated in 4.2.0
val enableProperty<Boolean>

Flag controlling whether the output is enabled.

It is safe to change the value in case a specific output should be disabled

enabled

Added in 4.2.0
val enabledProperty<Boolean>

Flag controlling whether the output is enabled.

It is safe to change the value in case a specific output should be disabled

versionCode

Added in 4.2.0
val versionCodeProperty<Int>

The version code for this output.

This will be initialized with the variant's merged flavor value or read from the manifest file if unset.

It is safe to modify it. When using Splits/Multi-APK output, it is generally necessary to change this value per output.

versionName

Added in 4.2.0
val versionNameProperty<String>

The version name for this output.

This will be initialized with the variant's merged flavor value, or it will be read from the manifest source file if it's not set via the DSL, or it will be null if it's also not set in the manifest.

It is safe to modify it.