gradle
8.3

# getPlugin

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

### 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.