api / org.gradle.api.attributes / AttributeContainer / getAttribute

getAttribute

abstract fun <T : Any> getAttribute(key: Attribute<T>): T

Returns the value of an attribute found in this container, or null if this container doesn't have it.

Parameters

- the type of the attribute

key - the attribute key

Return
the attribute value, or null if not found