ModulesRuleBuilder
A builder for compiling and verifying architectural rules on project modules.
Accumulates filtering conditions (that()) and assertions (should()), which are verified against a project structure by calling check.
Functions
Configures this builder to allow empty selections (i.e. if no modules match the that() filter, the rule will pass instead of throwing an AssertionError).
Logical AND operator for chaining filter conditions.
Logical AND operator for chaining assertion conditions.
Executes the built module rules against the specified project graph.
Logical NOT operator for negating the next filter condition.
Logical NOT operator for negating the next assertion condition.
Logical OR operator for chaining filter conditions.
Logical OR operator for chaining assertion conditions.
Starts adding assertion rules that the selected modules must satisfy.
Asserts rules on filtered modules using a lambda block that provides a ModuleShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.
Starts adding filtering conditions to select which modules to verify.
Filters modules in this rule using a concise lambda predicate evaluated on each Module.
Logical XOR (Exclusive OR) operator for chaining filter conditions.
Logical XOR (Exclusive OR) operator for chaining assertion conditions.