# MultipleVariants

# MultipleVariants

```
interface MultipleVariants : PublishingOptions
```

|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.dsl.MultipleVariants](https://developer.android.com/reference/tools/gradle-api/7.1/com/android/build/api/dsl/MultipleVariants#) |

Multi variant publishing options.

## Summary

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

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

## 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.