api / org.gradle.language / BinaryCollection / getByName

getByName

abstract fun getByName(name: String): BinaryProvider<T>

Returns a BinaryProvider that contains the single binary with the given name. The binary will be in the finalized state. The provider can be used to apply configuration to the element before it is finalized.

Querying the return value will fail when there is not exactly one matching binary.

Parameters

name - The name of the binary

Return
a binary from the collection in a finalized state