# getPlugin

inline fun <T : Plugin<*>> PluginContainer. getPlugin(type: KClass<T>): T
inline fun <T : Plugin<*>> PluginContainer. getPlugin(type: KClass<T>): T

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.PluginContainer.getPlugin.

#### See also

PluginContainer.getPlugin

inline fun <T : Any> Convention. getPlugin(): T

### Deprecated

The concept of conventions is deprecated. Use extensions instead.

Locates the plugin convention object with the given type.

#### Return

the convention plugin

#### Parameters

T

the convention plugin type

#### See also

Convention.getPlugin

#### Throws

IllegalStateException

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

fun <T : Any> Convention. getPlugin(conventionType: KClass<T>): T

### Deprecated

The concept of conventions is deprecated. Use extensions instead.

Locates the plugin convention object with the given type.

#### Return

the convention plugin

#### Parameters

conventionType

the convention plugin type

#### See also

Convention.getPlugin

#### Throws

IllegalStateException

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