gradle
8.4

# getPlugin

abstract fun <T> getPlugin(type: Class<T>): T(source)

### Deprecated

Locates the plugin convention object with the given type.

#### Return

The object. Never returns null.

#### Deprecated

Use extensions instead. This is scheduled for removal in Gradle 9.

#### Parameters

type

The convention object type.

#### See also

ExtensionAware

#### Throws

IllegalStateException

When there is no such object contained in this convention, or when there are multiple such objects.