assertNoCycles

fun assertNoCycles(includeTestConfigurations: Boolean = false)

Detects dependency cycles in the module graph and throws an AssertionError if any cycle is found. The verification is performed using a Depth-First Search (DFS) traversal over module dependency edges. Note: DFS depth corresponds to the maximum module dependency depth in the graph.

Parameters

includeTestConfigurations

if true, test-related dependency configurations will also be analyzed for cycles. If false (default), they are skipped.

Throws

if any circular dependency is detected.