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.
Methods inherited from interface java.lang.Iterable |
iterator |
Methods inherited from interface java.lang.Iterable |
iterator |
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 usedproject
- 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 usedproject
- 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