# set

abstract fun set(@Nullable value: @Nullable T)(source)

Sets the value of the property to the given value, replacing whatever value the property already had.

This method can also be used to discard the value of the property, by passing it `null`. When the value is discarded (or has never been set in the first place), the convention (default value) for this property, if specified, will be used to provide the value instead.

#### Parameters

value

The value, can be null.

abstract fun set(provider: Provider<out T>)(source)

Sets the property to have the same value as the given provider, replacing whatever value the property already had. This property will track the value of the provider and query its value each time the value of the property is queried. When the provider has no value, this property will also have no value.

This method can NOT be used to discard the value of the property. Specifying a `null` provider will result in an `IllegalArgumentException` being thrown. When the provider has no value, this property will also have no value - regardless of whether or not a convention has been set.

When the given provider represents a task output, this property will also carry the task dependency information from the provider.

#### Parameters

provider

The provider of the property's value, can't be null.