Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.plugins
Interface Convention

    org.gradle.api.internal.DynamicObject
      org.gradle.api.plugins.Convention

All Superinterfaces:
  DynamicObject

    interface Convention
    extends DynamicObject

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.

author:
  Hans Dockter

Method Summary
`T` | `getPlugin(java.lang.Class type)` Locates the plugin convention object with the given type.
`Map` | `getPlugins()` Returns the plugin convention objects contained in this convention.

Method Detail

### getPlugin

    public T getPlugin(java.lang.Class type)

  Locates the plugin convention object with the given type.
  param:
    type The convention object type.
  return:
    The object. Never returns null.
  throws:
    IllegalStateException When there is no such object contained in this convention, or when there are multiple such objects.

### getPlugins

    public Map getPlugins()

  Returns the plugin convention objects contained in this convention.
  return:
    The plugins. Returns an empty map when this convention does not contain any convention objects.

Groovy Documentation