ManifestFiles

Added in 8.5.0-alpha06

interface ManifestFiles : Named


Defines a set of manifests for particular variant. Adding manifest is always added static and generated manifests carry the highest possible priority across all manifests.

Summary

Public functions

Unit
<TASK : Task> addGeneratedManifestFile(
    taskProvider: TaskProvider<TASK>,
    wiredWith: (TASK) -> RegularFileProperty
)

Add the output of a custom task to the list of manifests.

Unit
addStaticManifestFile(relativeFilePath: String)

Add existing manifest file to the variant.

Public properties

Provider<List<RegularFile>>

Get all registered manifests as a List of RegularFile.

Inherited functions

From org.gradle.api.Named

Public functions

addGeneratedManifestFile

fun <TASK : Task> addGeneratedManifestFile(
    taskProvider: TaskProvider<TASK>,
    wiredWith: (TASK) -> RegularFileProperty
): Unit

Add the output of a custom task to the list of manifests.

The RegularFileProperty is the output of a Task TASK that has been registered using the Gradle's Task manager.

The manifest is added last to the variant's list and has the highest priority.

Parameters
taskProvider: TaskProvider<TASK>

the TaskProvider returned by Gradle's Task manager when registering the Task of type TASK.

wiredWith: (TASK) -> RegularFileProperty

the method reference returning the TASK task's output to use as a source directory. The generated manifest location is automatically determined by the Android Gradle Plugin

addStaticManifestFile

Added in 8.5.0-alpha06
fun addStaticManifestFile(relativeFilePath: String): Unit

Add existing manifest file to the variant.

The file will be added last in the list of manifest files for the variant. As long as there is a manifest merging process, added manifest will overlay others and become the one with the highest priority.

Do not use addStaticManifestFile to add sources that are generated by a task, instead use addGeneratedManifestFile

Parameters
relativeFilePath: String

the manifest file path, that will be resolved using the Directory.file API relative to the Gradle project directory.

Public properties

all

Added in 8.5.0-alpha06
val allProvider<List<RegularFile>>

Get all registered manifests as a List of RegularFile.

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

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