Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.plugins
Interface ProjectPluginsContainer

All Superinterfaces:
  DomainObjectCollection<Plugin>, DomainObjectContainer<Plugin>, java.lang.Iterable<Plugin>, PluginCollection<Plugin>, PluginContainer

    public interface ProjectPluginsContainer

extends PluginContainer

A `ProjectPluginsContainer` is used by a project to use plugins against the project and manage the plugins that have been used. Plugins can be specified by id or type. The id of a plugin is specified in the plugin.properties file in GRADLE_HOME. Only the plugin specified there have an id. The name of a plugin is either its id. In the case a plugin does not has an id, its name is the fully qualified class name.

Method Summary
`Plugin` | `getPlugin(java.lang.Class<? extends Plugin> type)` Returns a plugin with the specified type if this plugin has been used in the project.
`Plugin` | `getPlugin(java.lang.String id)` Returns a plugin with the specified id if this plugin has been used in the project.
`
`<T extends Plugin> T`
` | `usePlugin(java.lang.Class<T> type, Project project)` Uses a plugin against a particular project.
`Plugin` | `usePlugin(java.lang.String id, Project project)` Has the same behavior as `usePlugin(Class, org.gradle.api.Project)` except that the the plugin is specified via its id.

Methods inherited from interface org.gradle.api.plugins.PluginContainer
`findPlugin, findPlugin, hasPlugin, hasPlugin`

Methods inherited from interface org.gradle.api.plugins.PluginCollection
`allPlugins, allPlugins, getAt, getByName, matching, whenPluginAdded, whenPluginAdded, withType`

Methods inherited from interface org.gradle.api.DomainObjectContainer
`addRule, getRules`

Methods inherited from interface org.gradle.api.DomainObjectCollection
`allObjects, allObjects, findAll, findByName, getAll, getAsMap, getByName, whenObjectAdded, whenObjectAdded, whenObjectRemoved`

Methods inherited from interface java.lang.Iterable
`iterator`

Method Detail

### usePlugin

    Plugin usePlugin(java.lang.String id,
                     Project project)

  Has the same behavior as `usePlugin(Class, org.gradle.api.Project)` except that the the plugin is specified via its id. Not all plugins have an id.

  Parameters:
    `id` - The id of the plugin to be used
    `project` - The project against the plugin should be used
  Returns:
    The plugin which has been used against the project.

### usePlugin

    <T extends Plugin> T usePlugin(java.lang.Class<T> type,
                                   Project project)

  Uses a plugin against a particular project. This usually means that the plugin uses the project API to add and modify the state of the project. This method can be called an arbitrary number of time for a particular plugin type. The plugin will be actually used only the first time this method is called.

  Parameters:
    `type` - The type of the plugin to be used
    `project` - The project against the plugin should be used
  Returns:
    The plugin which has been used against the project.

### getPlugin

    Plugin getPlugin(java.lang.String id)

  Returns a plugin with the specified id if this plugin has been used in the project.

  Parameters:
    `id` - The id of the plugin

### getPlugin

    Plugin getPlugin(java.lang.Class<? extends Plugin> type)

  Returns a plugin with the specified type if this plugin has been used in the project.

  Parameters:
    `type` - The type of the plugin

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD