dependsOn
Adds a Kotlin-specific relation to the other source set.
Consider a general example that has Kotlin source sets A
and B
. The expression A.dependsOn(B)
instructs Kotlin that:
A
observes the API fromB
, including internal declarations.A
can provide actual implementations for expected declarations fromB
if and only ifA.dependsOn(B)
, either directly or through a transitivedependsOn
relationship. This is both a necessary and sufficient condition.Source code from
A
will always compile together with source code fromB
. The opposite is not true!A
extends dependencies from all dependency configurations ofB
.A
inherits all KotlinSourceSets thatB
has a dependsOn relationship with.
For more information, see dependsOn
and source set hierarchies.
Returns a set of source sets that have a dependsOn relationship with this source set.
Return
a set of source sets added with dependsOn
relationship at the current state of configuration. Note that the Kotlin Gradle plugin may add additional required source sets on late stages of Gradle configuration and the most reliable way to get a full final set is to use this property as a task input with org.gradle.api.provider.Provider type.