@Incubating abstract fun <T : Any> property(clazz: Class<T>): PropertyState<T>
Creates a PropertyState
implementation based on the provided class.
clazz
- The class to be used for property state.
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
@Nullable abstract fun property(propertyName: String): Any
Returns the value of the given property. This method locates a property as follows:
propertyName
- The name of the property.
MissingPropertyException
- When the given property is unknown.
Return
The value of the property, possibly null.
See Also
Project#findProperty(String)