ModulesShould

Fluent API for defining assertion rules on Gradle modules.

Functions

Link copied to clipboard
fun allOf(vararg blocks: ModulesShould.() -> Unit): ModulesRuleBuilder

Asserts that all of the nested assertion blocks are satisfied.

Link copied to clipboard
fun anyOf(vararg blocks: ModulesShould.() -> Unit): ModulesRuleBuilder

Asserts that at least one of the nested assertion blocks is satisfied.

Link copied to clipboard
fun noneOf(vararg blocks: ModulesShould.() -> Unit): ModulesRuleBuilder

Asserts that none of the nested assertion blocks are satisfied.

Link copied to clipboard
fun notDependOnExternalLibraries(vararg coordinates: String, includeTransitive: Boolean = true): ModulesRuleBuilder

Asserts that selected modules do not depend on the specified external maven libraries.

Link copied to clipboard
fun notDependOnModule(vararg targetPaths: String): ModulesRuleBuilder

Asserts that selected modules do not depend on any of the specified target modules.

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

Asserts that selected modules do not depend on any module matching the predicate.

Asserts that selected modules do not depend on the specified target module.

Link copied to clipboard
fun onlyBeDependedOnBy(vararg allowedPatterns: String): ModulesRuleBuilder
infix fun onlyBeDependedOnBy(allowedPatterns: List<String>): ModulesRuleBuilder

Asserts that selected modules are depended on only by modules matching the specified allowed patterns.

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

Asserts that selected modules are depended on only by modules matching the predicate.

infix fun onlyBeDependedOnBy(allowedPattern: String): ModulesRuleBuilder

Asserts that selected modules are depended on only by modules matching the specified allowed pattern.

Link copied to clipboard
fun onlyDependOnExternalLibraries(vararg coordinates: String, includeTransitive: Boolean = true): ModulesRuleBuilder

Asserts that selected modules only depend on the specified external maven libraries.

Link copied to clipboard
fun onlyDependOnModules(vararg allowedPatterns: String): ModulesRuleBuilder
infix fun onlyDependOnModules(allowedPatterns: List<String>): ModulesRuleBuilder

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

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

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

infix fun onlyDependOnModules(allowedPattern: String): ModulesRuleBuilder

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

Link copied to clipboard
infix fun satisfy(assertion: (Module) -> Boolean): ModulesRuleBuilder
infix fun satisfy(description: String): ModulesRuleBuilder

Asserts that selected modules satisfy a custom condition.

Satisfies an arbitrary custom assertion logic with custom violations builder.