with Convention
inline fun <ConventionType : Any, ReturnType> Any.withConvention(conventionType: KClass<ConventionType>, function: ConventionType.() -> ReturnType): ReturnType(source)
Deprecated
The concept of conventions is deprecated. Use extensions instead.
Evaluates the given function against the convention plugin of the given conventionType.
Return
the value returned by the given function.
Parameters
convention Type
the type of the convention to be located.
function
function to be evaluated.
See also
Convention. getPlugin
Throws
When the receiver does not support convention plugins, when there is no convention plugin of the given type, or when there are multiple such plugins.