# all

abstract fun all(rule: Action<in ComponentMetadataDetails>): ComponentMetadataHandler(source)

Adds a rule action that may modify the metadata of any resolved software component.

#### Return

this

#### Since

2.3

#### Parameters

rule

the rule to be added

abstract fun all(@DelegatesTo(value = ComponentMetadataDetails::class) rule: Closure<out Any>): ComponentMetadataHandler(source)

Adds a rule closure that may modify the metadata of any resolved software component.

The supplied rule closure must declare a ComponentMetadataDetails as it's first parameter, allowing the component metadata to be modified.

In addition, the rule can declare additional (read-only) parameters, which may provide extra details about the component. The order of these additional parameters is not significant.

The following additional parameter types are supported:

- org.gradle.api.artifacts.ivy.IvyModuleDescriptor - additional Ivy-specific metadata. Rules declaring this parameter will only be invoked for components packaged as an Ivy module.
- org.gradle.api.artifacts.maven.PomModuleDescriptor - additional Maven-specific metadata. Rules declaring this parameter will only be invoked for components packaged as a POM module.

#### Return

this

#### Since

2.3

#### Parameters

rule

the rule to be added

abstract fun all(rule: Class<out ComponentMetadataRule>): ComponentMetadataHandler(source)

Adds a class based rule that may modify the metadata of any resolved software component.

#### Return

this

#### Since

4.9

#### Parameters

rule

the rule to be added

abstract fun all(rule: Class<out ComponentMetadataRule>, configureAction: Action<in ActionConfiguration>): ComponentMetadataHandler(source)

Adds a class based rule that may modify the metadata of any resolved software component. The rule itself is configured by the provided configure action.

#### Return

this

#### Since

4.9

#### Parameters

rule

the rule to be added

configureAction

the rule configuration

abstract fun all(ruleSource: Any): ComponentMetadataHandler(source)

### Deprecated

Use all or all instead.

Adds a rule that may modify the metadata of any resolved software component.

The ruleSource is an Object that has a single rule method annotated with org.gradle.model.Mutate.

This rule method:

- must return void.
- must have ComponentMetadataDetails as the first parameter.
- may have an additional parameter of type org.gradle.api.artifacts.ivy.IvyModuleDescriptor or org.gradle.api.artifacts.maven.PomModuleDescriptor.

#### Return

this

#### Since

2.3

#### Parameters

ruleSource

the rule source object to be added