onlyDependOnModules

infix fun onlyDependOnModules(allowedPattern: String): ModulesRuleBuilder

Asserts that selected modules depend only on modules matching the specified allowed pattern.

Parameters

allowedPattern

Glob pattern representing a module that is permitted to be a dependency.


infix fun onlyDependOnModules(allowedPatterns: List<String>): ModulesRuleBuilder
fun onlyDependOnModules(vararg allowedPatterns: String): ModulesRuleBuilder

Asserts that selected modules depend only on modules matching the specified allowed patterns.

Parameters

allowedPatterns

Glob patterns representing modules that are permitted to be dependencies.


Asserts that selected modules depend only on modules matching the predicate.

Parameters

predicate

Predicate checking target module path.


fun onlyDependOnModules(description: String, predicate: (String) -> Boolean): ModulesRuleBuilder

Asserts that selected modules depend only on modules matching the predicate.

Parameters

description

A descriptive string for the predicate used in violations.

predicate

Predicate checking target module path.