# setMetadataSupplier

abstract fun setMetadataSupplier(rule: Class<out ComponentMetadataSupplier>)(source)

Sets a custom metadata rule, which is capable of supplying the metadata of a component (status, status scheme, changing flag) whenever a dynamic version is requested. It can be used to provide metadata directly, instead of having to parse the Ivy descriptor.

#### Since

4.9

#### Parameters

rule

the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.

abstract fun setMetadataSupplier(rule: Class<out ComponentMetadataSupplier>, configureAction: Action<in ActionConfiguration>)(source)

Sets a custom metadata rule, possibly configuring the rule.

#### Since

4.9

#### Parameters

rule

the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.

configureAction

the action to use to configure the rule.