FlavoredComponentActionRegistrar

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

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

This registrar only offers product flavors and build type of ComponentIdentity as filters.

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 BuildTypedComponentActionRegistrar<ComponentT>
withBuildType(buildType: String)

Filters ComponentT instances using a build type reference.

abstract Unit
withBuildType(buildType: String, action: Action<ComponentT>)

Specifies the build type this filter should apply when filtering variants.

abstract Unit
withBuildType(buildType: String, action: ComponentT.() -> Unit)

Filters ComponentT instances using a build type reference and run a lambda of all the filtered instances.

Inherited functions

Public methods

withBuildType

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

Filters ComponentT instances using a build type reference.

Parameters
buildType: String to filter ComponentT on
Return
an instance of BuildTypedComponentActionRegistrar to further filter variants.

withBuildType

abstract fun withBuildType(
    buildType: String,
    action: Action<ComponentT>
): Unit

Specifies the build type this filter should apply when filtering variants.

withBuildType

abstract fun withBuildType(
    buildType: String,
    action: ComponentT.() -> Unit
): Unit

Filters ComponentT instances using a build type reference and run a lambda of all the filtered instances.

Parameters
buildType: String to filter ComponentT on
action: ComponentT.() -> Unit lambda function to run on filtered ComponentT