api / org.gradle.api.attributes / AttributeContainer / attribute

attribute

abstract fun <T : Any> attribute(key: Attribute<T>, value: T): AttributeContainer

Sets an attribute value. It is not allowed to use null as an attribute value.

Parameters

- the type of the attribute

key - the attribute key

value - the attribute value

Return
this container