ModuleShouldContext

Context receiver for writing declarative assertions on a Module element. Provides easy access to all element properties and custom helper assertions.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The target Module being verified.

Link copied to clipboard
Link copied to clipboard

The overall analyzed Gradle project graph.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Mutable collection where assertion failure messages are appended.

Functions

Link copied to clipboard
fun addViolation(message: String)

Appends a custom violation failure message to the assertion run.

Link copied to clipboard
fun check(condition: Boolean, message: String? = null)

Asserts condition is true, recording a violation with message when false. When message is omitted, a default message referencing element is used.