api / org.gradle.api.provider / ProviderFactory / property

property

abstract fun <T : Any> property(valueType: Class<T>): PropertyState<T>

Creates a PropertyState implementation to hold values of the given type.

The property will have a value equal to the default value of that type as defined by the Java language specification. Please see Oracle's Java manual for more information.

Any other data type than the standard Java data types returns a property with no value defined.

Parameters

valueType - The type of the property.

Return
The property. Never returns null.