api / org.gradle.api / Script / property

property

@Incubating abstract fun <T : Any> property(clazz: Class<T>): PropertyState<T>

Creates a PropertyState implementation based on the provided class.

Parameters

clazz - The class to be used for property state.

Exceptions

org.gradle.api.InvalidUserDataException - If the provided class is null.

Return
The property state. Never returns null.

See Also
org.gradle.api.provider.ProviderFactory#property(Class)

Since
4.0