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

Properties

Link copied to clipboard
abstract val outputDir: Provider<Directory>

The directory where the generated models will be written. This provider carries task dependency information.

Link copied to clipboard
abstract val task: TaskProvider<out Task>

The task that produces outputDir. Usually this is not needed as outputDir carries task dependency.

Functions

Link copied to clipboard

Connects the generated sources to all the Android variants Throws if the Android plugin is not applied

Link copied to clipboard
abstract fun connectToAndroidSourceSet(name: String)

Connects the generated sources to the given Android source set. Throws if the Android plugin is not applied

Link copied to clipboard
abstract fun connectToAndroidVariant(variant: Any)

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"

Link copied to clipboard
abstract fun connectToJavaSourceSet(name: String)

Connects the generated sources to the given Java source set. Throws if the Java plugin is not applied

Link copied to clipboard
abstract fun connectToKotlinSourceSet(name: String)

Connects the generated sources to the given Kotlin source set. Throws if the Kotlin plugin is not applied