FilteredVariantSelector

@Incubating interface FilteredVariantSelector<ComponentT : ComponentIdentity> : VariantSelector<ComponentT>
com.android.build.api.extension.FilteredVariantSelector

Summary

Public methods

abstract FilteredVariantSelector<ComponentT>
withBuildType(buildType: String)

Returns a new selector for ComponentT objects with a given build type.

abstract FilteredVariantSelector<ComponentT>
withFlavor(flavorToDimension: Pair<String, String>)

Returns a new selector for ComponentT objects with a given (dimension, flavorName).

abstract VariantSelector<ComponentT>
withName(pattern: Pattern)

Registers an Action for ComponentT objects with a given name pattern.

Public methods

withBuildType

abstract fun withBuildType(buildType: String): FilteredVariantSelector<ComponentT>

Returns a new selector for ComponentT objects with a given build type.

Parameters
buildType: String Build type to filter ComponentT on.
Return
An instance of BuildTypedComponentActionRegistrar to further filter variants.

withFlavor

abstract fun withFlavor(flavorToDimension: Pair<String, String>): FilteredVariantSelector<ComponentT>

Returns a new selector for ComponentT objects with a given (dimension, flavorName).

Parameters
flavorToDimension: Pair<String, String> Dimension and flavor to filter ComponentT on.
Return
FlavoredComponentActionRegistrar instance to further filter instances of ComponentT

withName

abstract fun withName(pattern: Pattern): VariantSelector<ComponentT>

Registers an Action for ComponentT objects with a given name pattern.

Parameters
pattern: Pattern Pattern to apply on the org.gradle.api.Named.getName to filter ComponentT instances on