SourceDirectories.Flat

Added in 7.3.0

interface SourceDirectories.Flat : SourceDirectories


Represents all the source folders for a source type in the variant.

All folders are considered of the same priority, so if there is a conflict (e.g, two files with the same relative path and name), it will require a resolution step like merging to ensure nothing gets lost.

Summary

Public properties

Provider<Collection<Directory>>

Get all registered source folders and files as a List of Directory.

Provider<Collection<Directory>>

Get all registered static file folders (non generated by a Task) as a List of Directory.

Inherited functions

From org.gradle.api.Named
From com.android.build.api.variant.SourceDirectories
Unit
<TASK : Task> addGeneratedSourceDirectory(
    taskProvider: TaskProvider<TASK>,
    wiredWith: (TASK) -> DirectoryProperty
)

Add the output of a custom task to the list of source directories.

Unit

Add a source directory with sources already present to the variant.

Public properties

all

Added in 8.9.0-alpha06
val allProvider<Collection<Directory>>

Get all registered source folders and files as a List of Directory.

Some source types do not have the concept of overriding, while others require a merging step to ensure only one source file is used when processing begins.

The returned Provider can be used directly in a org.gradle.api.tasks.InputFiles annotated property of a Task

static

Added in 8.4.0
val staticProvider<Collection<Directory>>

Get all registered static file folders (non generated by a Task) as a List of Directory.

The returned Provider can be used directly in a org.gradle.api.tasks.InputFiles annotated property of a Task