DirectoryConnection
A DirectoryConnection defines how the generated sources are connected to the rest of the build.
It provides helpers for the most common options as well as direct access to an output Provider that will carry task dependency.
It is valid to call multiple connectXyz() methods to connect the generated sources to multiple downstream tasks
Functions
Connects the generated sources to the main Android variants. Note: despite the name, this method does not connect to the test variants as the main classpath is accessible from the tests and adding the sources twice causes issues. See https://issuetracker.google.com/u/1/issues/268218176
Connects the generated sources to the given Android source set. Throws if the Android plugin is not applied
Connects the generated sources to the given Android variant. This will look up the most specific source set used by this variant. For an example, "demoDebug"
Connects the generated sources to the given Java source set. Throws if the Java plugin is not applied
Connects the generated sources to the given Kotlin source set. Throws if the Kotlin plugin is not applied