BuildTypedComponentActionRegistrar

@Incubating interface BuildTypedComponentActionRegistrar<ComponentT> where ComponentT : ActionableComponentObject, ComponentT : ComponentIdentity
com.android.build.api.component.BuildTypedComponentActionRegistrar

Allows registering Actions on ComponentT, with the ability to include filters to target sub sets of ComponentT.

This registrar is already filtered on build type and therefore only offers flavors of ComponentIdentity as a filter.

Calls can be chained to include more than one filters, though in some cases, selecting a particular filter can reduce the list of available filters in the chain.

Summary

Public methods

abstract Unit
withFlavor(flavorToDimension: Pair<String, String>, action: Action<ComponentT>)

Filters ComponentT instances with a flavor

abstract Unit
withFlavor(flavorToDimension: Pair<String, String>, action: ComponentT.() -> Unit)

Filters ComponentT instances with a flavor

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

Filters ComponentT instances with a flavor, and return the same filter instance for further product flavor filtering.

Public methods

withFlavor

abstract fun withFlavor(
    flavorToDimension: Pair<String, String>,
    action: Action<ComponentT>
): Unit

Filters ComponentT instances with a flavor

Parameters
flavorToDimension: Pair<String, String> the flavor name to flavor dimension
action: Action<ComponentT> Action to perform on each filtered variant.

withFlavor

abstract fun withFlavor(
    flavorToDimension: Pair<String, String>,
    action: ComponentT.() -> Unit
): Unit

Filters ComponentT instances with a flavor

Parameters
flavorToDimension: Pair<String, String> the flavor name to flavor dimension
action: ComponentT.() -> Unit Action to perform on each filtered variant.

withFlavor

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

Filters ComponentT instances with a flavor, and return the same filter instance for further product flavor filtering.

Parameters
flavorToDimension: Pair<String, String> the flavor name to flavor dimension
action Action to perform on each filtered variant.