api / org.gradle.api / NamedDomainObjectCollection / add

add

abstract fun add(element: T): Boolean

Adds an object to the collection, if there is no existing object in the collection with the same name.

Parameters

e - the item to add to the collection

Return
true if the item was added, or false if an item with the same name already exists.