Stay organized with collections
Save and categorize content based on your preferences.
VariantOutput
interface VariantOutput : VariantOutputConfiguration
Defines a variant output.
Summary
Public properties
versionCode
val versionCode: Property<Int?>
Returns a modifiable Property
representing the variant output version code.
This will be initialized with the variant's merged flavor value or read from the manifest file if unset.
versionName
val versionName: Property<String?>
Returns a modifiable Property
representing the variant output version name.
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.
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."],[],[],null,["# VariantOutput\n=============\n\n\n```\ninterface VariantOutput : VariantOutputConfiguration\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDefines a variant output.\n\nSummary\n-------\n\n| ### Public properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`\u003e` | [enable](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput#enable()) **This property is deprecated.** Replaced by enable |\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`\u003e` | [enabled](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput#enabled()) Returns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) to enable or disable the production of this [VariantOutput](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput) |\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?\u003e` | [versionCode](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput#versionCode()) Returns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) representing the variant output version code. |\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?\u003e` | [versionName](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput#versionName()) Returns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) representing the variant output version name. |\n\nPublic properties\n-----------------\n\n### enable\n\n```\nval enable: Property\u003cBoolean\u003e\n```\n| **This property is deprecated.** \n| Replaced by enable\n\nReturns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) to enable or disable the production of this [VariantOutput](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput) \n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`\u003e` | a [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) to enable or disable this output. |\n\n### enabled\n\n```\nval enabled: Property\u003cBoolean\u003e\n```\n\nReturns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) to enable or disable the production of this [VariantOutput](/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantOutput) \n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)`\u003c`[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`\u003e` | a [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) to enable or disable this output. |\n\n### versionCode\n\n```\nval versionCode: Property\u003cInt?\u003e\n```\n\nReturns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) representing the variant output version code.\n\nThis will be initialized with the variant's merged flavor value or read from the manifest file if unset. \n\n### versionName\n\n```\nval versionName: Property\u003cString?\u003e\n```\n\nReturns a modifiable [Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html) representing the variant output version name.\n\nThis 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."]]