Convention
Deprecated
A Convention
manages a set of convention objects. When you add a convention object to a
Convention
, and the properties and methods of the convention object become available as properties and methods of the object which the convention is associated to. A convention object is simply a POJO or POGO. Usually, a
Convention
is used by plugins to extend a org.gradle.api.Project or a org.gradle.api.Task.
Deprecated
Use extensions instead. This is scheduled for removal in Gradle 9.
See also
Functions
Adds a new extension to this container.
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.add.
Looks for the extension of the specified type and configures it with the supplied action.
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.configure.
Creates and adds a new extension to this container.
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.create.
Looks for the extension of a given type.
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.findByType.
Locates the plugin convention object with the given type.
Looks for the extension of a given name. If none found it will throw an exception.
Looks for the extension of a given type.
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.ExtensionContainer.getByType.
Looks for the convention plugin of a given name and casts it to the expected type T.