api / org.gradle.api / Task / property
property
@Nullable abstract fun property(propertyName: String): Any
Returns the value of the given property of this task. This method locates a property as follows:
- If this task object has a property with the given name, return the value of the property.
- If this task has an extension with the given name, return the extension.
- If this task's convention object has a property with the given name, return the value of the property.
- If this task has an extra property with the given name, return the value of the property.
- If not found, throw MissingPropertyException
Parameters
propertyName
- The name of the property.
Exceptions
MissingPropertyException
- When the given property is unknown.
Return
The value of the property, possibly null.