setProperty

abstract fun setProperty(name: String, value: Any)(source)

Sets a property of this task. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.

  1. The task object itself. For example, the enabled project property.
  2. The task's convention object.
  3. The task's extra properties.
If the property is not found, a groovy.lang.MissingPropertyException is thrown.

Parameters

name

The name of the property

value

The value of the property