SourceDirectories.Layered

Added in 7.3.0

interface SourceDirectories.Layered : SourceDirectories


Represent a collection of directories that have overlay properties to each other. This mean that some directories will carry higher priority when merging content will be carried out.

The collection is represented as a List where the first elements are the highest priority ones.

For a specific priority, there can be more than one directory defined and is represented as a Collection of Directory.

Therefore, Layered can be represented as a List of Collection of Directory.

Summary

Public properties

Provider<List<Collection<Directory>>>

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

Provider<List<Collection<Directory>>>

Get all registered static file folders (non generated by a Task) as a List of Collection 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.8.0-alpha09
val allProvider<List<Collection<Directory>>>

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

The outer List represents the priority of Directory respective to each other, meaning that elements first in the list overrides elements last in the list.

The inner Collection represents all Directory with the same priority respective to each other.

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<List<Collection<Directory>>>

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

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