ArchitectureLayerPolicy
First-class, declarative architectural-layer policy DSL.
A layer groups a set of modules and/or packages and declares which other layers it may (or may not) depend on, and which layers may (or may not) depend on it. The policy is compiled down to the primitive Konture module/package selectors and class dependency assertions.
Example Usage:
architecture {
layer("feature") {
selector {
modules(":feature:**")
}
mayDependOn("core", "domain")
mustNotDependOn("feature")
}
layer("domain") {
selector {
packages("com.acme.domain..")
}
mayDependOn("core")
}
}Properties
Functions
Restricts the layers that are allowed to depend on this layer (intra-layer dependencies are always allowed).
Restricts the layers that are allowed to depend on this layer.
Restricts the layers this layer is allowed to depend on (intra-layer dependencies are always allowed).
Restricts the layers this layer is allowed to depend on.
Forbids the given layers from depending on this layer.
Forbids this layer from depending on the given layers.
Declares which modules and/or packages belong to this layer.