api / org.gradle.api.plugins / Convention / getPlugin

getPlugin

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

Locates the plugin convention object with the given type.

Parameters

type - The convention object type.

Exceptions

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

Return
The object. Never returns null.