dependsOn

abstract fun Layer.dependsOn(layer: Layer, vararg layers: Layer)

Adds dependencies between the current layer and the specified layers.

Receiver

The Layer that depends on other layers.

Parameters

layer

The layer that the current layer depends on.

layers

The layers that the current layer depends on.


abstract fun Layer.dependsOn(layers: Set<Layer>)

Adds dependencies between the current layer and the specified list of layers.

Receiver

The Layer that depends on other layers.

Parameters

layers

The list of layers that the current layer depends on.


abstract fun Collection<Layer>.dependsOn(layer: Layer)

Adds dependencies between each layer in the collection and the specified layer.

Example usage:

val layers = setOf(domainLayer, dataLayer)
layers.dependsOn(presentationLayer)

Receiver

The collection of Layers that depends on other layer.

Parameters

layer

The layer that the collection of layers depends on.


abstract fun Collection<Layer>.dependsOn(layers: Set<Layer>)

Adds dependencies between each layer in the collection and the specified layers.

Example usage:

val sourceLayers = setOf(domainLayer, dataLayer)
val targetLayers = setOf(presentationLayer, infrastructureLayer)
sourceLayers.dependsOn(targetLayers)

Receiver

The collection of Layers that depends on other layers.

Parameters

layers

The set of layers that the collection of layers depends on.