# DependencySelection

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


```
interface DependencySelection
```

<br />

*** ** * ** ***

Specifies options for doing Gradle variant selection for external Android dependencies based on build types and product flavors.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/DependencySelection#productFlavorDimension(kotlin.String,org.gradle.api.Action)( dimension: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, action: https://docs.gradle.org/current/javadoc/org/gradle/api/Action.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/ProductFlavorDimensionSpec> )` Configures a single product flavor dimension that the plugin should try to use when a direct variant match with a dependency is not possible. |

| ### Public properties |
|---|---|
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ListProperty.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/DependencySelection#selectBuildTypeFrom()` Specifies a list of build types that the plugin should try to use when a direct variant match with a dependency is not possible. |

## Public functions

### productFlavorDimension

Added in 8.12.0

```
fun productFlavorDimension(
    dimension: String,
    action: Action<ProductFlavorDimensionSpec>
): Unit
```

Configures a single product flavor dimension that the plugin should try to use when a direct variant match with a dependency is not possible.

## Public properties

### selectBuildTypeFrom

Added in 8.12.0

```
val selectBuildTypeFrom: ListProperty<String>
```

Specifies a list of build types that the plugin should try to use when a direct variant match with a dependency is not possible.

If the list is left empty, the default variant for the dependencies being consumed will be of build type "release"

If you want to preserve the default value use `selectBuildTypeFrom.add()` and if you would like to set your own list of build types use `selectBuildTypeFrom.set()`