For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

setProperty

abstract fun <T> setProperty(elementType: Class<T>): SetProperty<T>(source)

Creates a SetProperty implementation to hold a Set of the given element type T. The property has an empty set as its initial value.

The implementation will return immutable Set values from its query methods.

Return

The property. Never returns null.

Since

4.5

Parameters

elementType

The type of element.

<T>

The type of element.