AbstractSourceDirectories
@Incubating interface AbstractSourceDirectories
SourceAndOverlayDirectories |
Represent a collection of directories that have overlay properties to each other. |
SourceDirectories |
Represents all the source folders for a source type in the variant. |
Defines all common behaviors to sources access in AGP.
Adding directories is always added to the "Variant" overlay and will therefore carry the highest possible priority among all directories for the source type.
Summary
Public functions |
|
---|---|
Unit |
<TASK : Task?> add( 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 functions
add
fun <TASK : Task?> add(
taskProvider: TaskProvider<TASK?>?,
wiredWith: ((TASK) -> Provider<Directory>)?
): Unit
Add the output of a custom task to the list of source directories.
The Directory
is the output of a Task TASK
that has been registered using the Gradle's Task manager.
The Directory
is added last to the variant's list of source directories. In case there is merging for the source type, the Directory
will have the highest priority.
Parameters | |
---|---|
taskProvider: TaskProvider<TASK?>? |
the |
wiredWith: ((TASK) -> Provider<Directory>)? |
the method reference returning the |
addSrcDir
fun addSrcDir(srcDir: String?): Unit
Add a source directory with sources already present to the variant.
The directory will be added last in the list of source folders for the variant. In case there is merging for the source type, srcDir
will be the folder with the highest priority.
Do not use addSrcDir
to add sources that are generated by a task, instead use add
Parameters | |
---|---|
srcDir: String? |
the source directory path, that will be resolved using the |