|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PluginContainer
A PluginContainer
is used to manage a set of Plugin
instances applied to a
particular project.
Plugins can be specified using either an id or type. The id of a plugin is specified using a META-INF/gradle-plugins/${id}.properties classpath resource.
Method Summary | ||
---|---|---|
|
apply(Class<T> type)
Applies a plugin to the project. |
|
Plugin |
apply(String id)
Has the same behavior as apply(Class) except that the the plugin is specified via its id. |
|
|
findPlugin(Class<T> type)
Returns the plugin for the given type. |
|
Plugin |
findPlugin(String id)
Returns the plugin for the given id. |
|
|
getAt(Class<T> type)
Returns a plugin with the specified type if this plugin has been used in the project. |
|
Plugin |
getAt(String id)
Returns a plugin with the specified id if this plugin has been used in the project. |
|
|
getPlugin(Class<T> type)
Returns a plugin with the specified type if this plugin has been used in the project. |
|
Plugin |
getPlugin(String id)
Returns a plugin with the specified id if this plugin has been used in the project. |
|
boolean |
hasPlugin(Class<? extends Plugin> type)
Returns true if the container has a plugin with the given type, false otherwise. |
|
boolean |
hasPlugin(String id)
Returns true if the container has a plugin with the given id, false otherwise. |
Methods inherited from interface org.gradle.api.plugins.PluginCollection |
---|
allPlugins, allPlugins, matching, matching, whenPluginAdded, whenPluginAdded, withType |
Methods inherited from interface org.gradle.api.DomainObjectCollection |
---|
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
Plugin apply(String id)
apply(Class)
except that the the plugin is specified via its id. Not all
plugins have an id.
id
- The id of the plugin to be applied.
<T extends Plugin> T apply(Class<T> type)
type
- The type of the plugin to be used
boolean hasPlugin(String id)
id
- The id of the pluginboolean hasPlugin(Class<? extends Plugin> type)
type
- The type of the pluginPlugin findPlugin(String id)
id
- The id of the plugin
<T extends Plugin> T findPlugin(Class<T> type)
type
- The type of the plugin
Plugin getPlugin(String id) throws UnknownPluginException
id
- The id of the plugin
UnknownPluginException
- When there is no plugin with the given id.<T extends Plugin> T getPlugin(Class<T> type) throws UnknownPluginException
type
- The type of the plugin
UnknownPluginException
- When there is no plugin with the given type.Plugin getAt(String id) throws UnknownPluginException
[]
operator to call this method from a build script.
id
- The id of the plugin
UnknownPluginException
- When there is no plugin with the given id.<T extends Plugin> T getAt(Class<T> type) throws UnknownPluginException
[]
operator to call this method from a build script.
type
- The type of the plugin
UnknownPluginException
- When there is no plugin with the given type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |