api / org.gradle.api.provider / HasMultipleValues / add

add

abstract fun add(element: T): Unit

Adds an element to the property value.

Parameters

element - The element

Exceptions

NullPointerException - if the specified element is null

abstract fun add(provider: Provider<out T>): Unit

Adds an element to the property value.

The given provider will be queried when the value of the property is queried. The property will have no value when the given provider has no value.

Parameters

provider - Provider