withDependencies

Execute the given action before the configuration first participates in dependency resolution. A Configuration will participate in dependency resolution when:

This method is useful for mutating the dependencies for a configuration:
configurations { conf }
configurations['conf'].withDependencies { dependencies ->
     dependencies.each { dependency ->
         if (dependency.version == null) {
             dependency.version { require '1.0' }
         }
     }
}
Actions will be executed in the order provided.

Since

4.4

Return

this

Parameters

action

a dependency action to execute before the configuration is used.