FilteredComponentActionRegistrar
@Incubating interface FilteredComponentActionRegistrar<ComponentT> where ComponentT : ActionableComponentObject, ComponentT : ComponentIdentity
com.android.build.api.component.FilteredComponentActionRegistrar |
Allows registering Actions on ComponentT, with the ability to include filters to target sub sets of ComponentT.
The filters acts on the properties of ComponentIdentity
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) Returns a new registrar for ComponentT objects with a given build type. |
abstract Unit |
withBuildType(buildType: String, action: Action<ComponentT>) Registers an Action for ComponentT objects with a given build type. |
abstract Unit |
withBuildType(buildType: String, action: ComponentT.() -> Unit) Registers an action for ComponentT objects with a given build type. |
abstract FlavoredComponentActionRegistrar<ComponentT> |
withFlavor(flavorToDimension: Pair<String, String>) Returns a new registrar for ComponentT objects with a given (dimension, flavorName). |
abstract Unit |
withFlavor(flavorToDimension: Pair<String, String>, action: Action<ComponentT>) Registers an Action for ComponentT objects with a given (dimension, flavorName). |
abstract Unit |
withFlavor(flavorToDimension: Pair<String, String>, action: ComponentT.() -> Unit) Registers an action for ComponentT objects with a given (dimension, flavorName). |
abstract Unit |
Registers an Action for ComponentT objects with a given name pattern. |
abstract Unit |
Registers an Action for ComponentT objects with a given name. |
abstract Unit |
Registers an action for ComponentT objects with a given name. |
Public methods
withBuildType
abstract fun withBuildType(buildType: String): BuildTypedComponentActionRegistrar<ComponentT>
Returns a new registrar for ComponentT objects with a given build type.
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
Registers an Action for ComponentT objects with a given build type.
Parameters | |
---|---|
buildType: String | to filter ComponentT on |
action: Action<ComponentT> | Action to run on filtered ComponentT |
withBuildType
abstract fun withBuildType(
buildType: String,
action: ComponentT.() -> Unit
): Unit
Registers an action for ComponentT objects with a given build type.
Parameters | |
---|---|
buildType: String | to filter ComponentT on |
action: ComponentT.() -> Unit | lambda function to run on filtered ComponentT |
withFlavor
abstract fun withFlavor(flavorToDimension: Pair<String, String>): FlavoredComponentActionRegistrar<ComponentT>
Returns a new registrar for ComponentT objects with a given (dimension, flavorName).
Parameters | |
---|---|
flavorToDimension: Pair<String, String> | to filter ComponentT on |
Return | |
---|---|
FlavoredComponentActionRegistrar instance to further filter instances of ComponentT |
withFlavor
abstract fun withFlavor(
flavorToDimension: Pair<String, String>,
action: Action<ComponentT>
): Unit
Registers an Action for ComponentT objects with a given (dimension, flavorName).
Parameters | |
---|---|
flavorToDimension: Pair<String, String> | to filter ComponentT on |
action: Action<ComponentT> | Action to run on filtered ComponentT |
withFlavor
abstract fun withFlavor(
flavorToDimension: Pair<String, String>,
action: ComponentT.() -> Unit
): Unit
Registers an action for ComponentT objects with a given (dimension, flavorName).
Parameters | |
---|---|
flavorToDimension: Pair<String, String> | to filter ComponentT on |
action: ComponentT.() -> Unit | lambda function to run on filtered ComponentT |
withName
abstract fun withName(
pattern: Pattern,
action: Action<ComponentT>
): Unit
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 |
action: Action<ComponentT> | Action to run on filtered ComponentT |
withName
abstract fun withName(
name: String,
action: Action<ComponentT>
): Unit
Registers an Action for ComponentT objects with a given name.
Parameters | |
---|---|
name: String | name to filter ComponentT on |
action: Action<ComponentT> | Action to run on filtered ComponentT |
withName
abstract fun withName(
name: String,
action: ComponentT.() -> Unit
): Unit
Registers an action for ComponentT objects with a given name.
Parameters | |
---|---|
name: String | name to filter ComponentT on |
action: ComponentT.() -> Unit | lambda function to run on filtered ComponentT |