# MultipleVariants

# MultipleVariants

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/MultipleVariants.kt+class:com.android.build.api.dsl.MultipleVariants)  
Added in 7.1.0  

<br />

```
interface MultipleVariants : PublishingOptions
```

<br />

*** ** * ** ***

Multi variant publishing options.

## Summary

|                             ### Public functions                             |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [allVariants](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/MultipleVariants#allVariants())`()` Publish all the variants to the component.                                                                                                                                                                                                                                                                                                                      |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [includeBuildTypeValues](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/MultipleVariants#includeBuildTypeValues(kotlin.Array))`(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.                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [includeFlavorDimensionAndValues](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/MultipleVariants#includeFlavorDimensionAndValues(kotlin.String,kotlin.Array))`(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. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.android.build.api.dsl.PublishingOptions](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/PublishingOptions) |------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withJavadocJar](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/PublishingOptions#withJavadocJar())`()` Publish javadoc jar generated from java \& kotlin source as a secondary artifact to a Maven repository. | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withSourcesJar](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/PublishingOptions#withSourcesJar())`()` Publish java \& kotlin sources jar as a secondary artifact to a Maven repository.                       | |

## Public functions

### allVariants

Added in 7.1.0  

```
fun allVariants(): Unit
```

Publish all the variants to the component.  

### includeBuildTypeValues

Added in 7.1.0  

```
fun includeBuildTypeValues(vararg buildTypes: String): Unit
```

Publish variants to the component based on the specified build types.  

### includeFlavorDimensionAndValues

Added in 7.1.0  

```
fun includeFlavorDimensionAndValues(dimension: String, vararg values: String): Unit
```

Publish variants to the component based on the specified product flavor dimension and values.