api / org.gradle.api.plugins / Convention / findPlugin

findPlugin

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

Locates the plugin convention object with the given type.

Parameters

type - The convention object type.

Exceptions

IllegalStateException - When there are multiple matching objects.

Return
The object. Returns null if there is no such object.