# withModule

inline fun ComponentMetadataHandler.withModule(id: Any, rule: KClass<out ComponentMetadataRule>): ComponentMetadataHandler(source)
inline fun ComponentMetadataHandler.withModule(id: Any, rule: KClass<out ComponentMetadataRule>): ComponentMetadataHandler(source)
inline fun ComponentMetadataHandler.withModule(id: Any, rule: KClass<out ComponentMetadataRule>, configureAction: Action<in ActionConfiguration>): ComponentMetadataHandler(source)
inline fun ComponentMetadataHandler.withModule(id: Any, rule: KClass<out ComponentMetadataRule>, configureAction: Action<in ActionConfiguration>): ComponentMetadataHandler(source)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.artifacts.dsl.ComponentMetadataHandler.withModule.

#### Since

4.9

#### See also

org.gradle.api.artifacts.dsl.ComponentMetadataHandler.withModule

inline fun <T : ComponentMetadataRule> ComponentMetadataHandler.withModule(id: Any): ComponentMetadataHandler(source)
inline fun <T : ComponentMetadataRule> ComponentMetadataHandler.withModule(id: Any, configureAction: Action<in ActionConfiguration>): ComponentMetadataHandler(source)

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

#### Return

this

#### Parameters

id

the module to apply this rule to in "group:module" format or as a org.gradle.api.artifacts.ModuleIdentifier

#### Type Parameters

T

the rule to be added

#### See also

ComponentMetadataHandler.withModule