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.

property

@Nullable
abstract fun property(propertyName: String): @Nullable Any(source)

Returns the value of the given property of this task. This method locates a property as follows:

  1. If this task object has a property with the given name, return the value of the property.
  2. If this task has an extension with the given name, return the extension.
  3. If this task has an extra property with the given name, return the value of the property.
  4. If not found, throw MissingPropertyException

Return

The value of the property, possibly null.

Since

0.7

Parameters

propertyName

The name of the property.

Throws

groovy.lang.MissingPropertyException

When the given property is unknown.