closestDeclarationOrNull

Finds the existing dependency declaration (if there are any) which is the closest match to the desired new dependency.

Receiver

the project containing this declaration's match

Return

the closest matching declaration, or null if there are no declarations at all.

Since

0.12.0

Parameters

newDependency

The dependency being added

matchPathFirst

If true, matching project paths will be prioritized over matching configurations. If false, configuration matches will take priority over a matching project path.