# getPluginByName

inline fun <T : Any> Convention. getPluginByName(name: String): T(source)

### Deprecated

The concept of conventions is deprecated. Use extensions instead.

Looks for the convention plugin of a given name and casts it to the expected type T.

If no convention is found or if the one found cannot be cast to the expected type it will throw an IllegalStateException.

#### Return

the convention plugin, never null

#### Parameters

name

convention plugin name

#### Throws

IllegalStateException

When the convention cannot be found or cast to the expected type.