all
Adds a rule action that may modify the metadata of any resolved software component.
Return
this
Parameters
the rule to be added
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
Parameters
the rule to be added
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
Parameters
the rule source object to be added
Adds a class based rule that may modify the metadata of any resolved software component.
Return
this
Since
4.9
Parameters
the rule to be added
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
the rule to be added
the rule configuration