SourceDirectories.Flat

public interface SourceDirectories.Flat extends 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 methods

abstract @NonNull Provider<@NonNull Collection<@NonNull Directory>>

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

Inherited methods

From org.gradle.api.Named
abstract @NonNull String
From com.android.build.api.variant.SourceDirectories
abstract void
<TASK extends Task> addGeneratedSourceDirectory(
    @NonNull TaskProvider<@NonNull TASK> taskProvider,
    @NonNull Function1<@NonNull TASK, @NonNull DirectoryProperty> wiredWith
)

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

abstract void

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

Public methods

getAll

abstract @NonNull Provider<@NonNull Collection<@NonNull Directory>> getAll()

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