Stay organized with collections
Save and categorize content based on your preferences.
MultipleVariants
interface MultipleVariants : PublishingOptions
Multi variant publishing options.
Summary
Public methods
|
abstract Unit |
Publish all the variants to the component.
|
abstract Unit |
Publish variants to the component based on the specified build types.
|
abstract Unit |
Publish variants to the component based on the specified product flavor dimension and values.
|
Public methods
allVariants
abstract fun allVariants(): Unit
Publish all the variants to the component.
includeBuildTypeValues
abstract fun includeBuildTypeValues(vararg buildTypes: String): Unit
Publish variants to the component based on the specified build types.
includeFlavorDimensionAndValues
abstract fun includeFlavorDimensionAndValues(
dimension: String,
vararg values: String
): Unit
Publish variants to the component based on the specified product flavor dimension and values.
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,["# MultipleVariants\n================\n\n```\ninterface MultipleVariants : PublishingOptions\n```\n\n|-------------------------------------------------|\n| [com.android.build.api.dsl.MultipleVariants](#) |\n\nMulti variant publishing options.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [allVariants](#allVariants())`()` Publish all the variants to the component. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [includeBuildTypeValues](#includeBuildTypeValues(kotlin.String))`(`vararg` `buildTypes:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Publish variants to the component based on the specified build types. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [includeFlavorDimensionAndValues](#includeFlavorDimensionAndValues(kotlin.String,%20kotlin.String))`(`dimension:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `vararg` `values:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Publish variants to the component based on the specified product flavor dimension and values. |\n\n| ### Inherited functions ||\n|---|---|\n| From class [PublishingOptions](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PublishingOptions) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withJavadocJar](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PublishingOptions#withJavadocJar())`()` Publish javadoc jar generated from java \\& kotlin source as a secondary artifact to a Maven repository. \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withSourcesJar](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/PublishingOptions#withSourcesJar())`()` Publish java \\& kotlin sources jar as a secondary artifact to a Maven repository. \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### allVariants\n\n```\nabstract fun allVariants(): Unit\n```\n\nPublish all the variants to the component. \n\n### includeBuildTypeValues\n\n```\nabstract fun includeBuildTypeValues(vararg buildTypes: String): Unit\n```\n\nPublish variants to the component based on the specified build types. \n\n### includeFlavorDimensionAndValues\n\n```\nabstract fun includeFlavorDimensionAndValues(\n dimension: String, \n vararg values: String\n): Unit\n```\n\nPublish variants to the component based on the specified product flavor dimension and values."]]