Package org.gradle.api.plugins
Interface ObjectConfigurationAction
-
public interface ObjectConfigurationActionAn
ObjectConfigurationActionallows you to applyPlugins and scripts to an object or objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectConfigurationActionfrom(java.lang.Object script)Adds a script to use to configure the target objects.ObjectConfigurationActionplugin(java.lang.Class<? extends Plugin> pluginClass)Adds aPluginto use to configure the target objects.ObjectConfigurationActionplugin(java.lang.String pluginId)Adds aPluginto use to configure the target objects.ObjectConfigurationActionto(java.lang.Object... targets)Specifies some target objects to be configured.ObjectConfigurationActiontype(java.lang.Class<?> pluginClass)Adds the plugin implemented by the given class to the target.
-
-
-
Method Detail
-
to
ObjectConfigurationAction to(java.lang.Object... targets)
Specifies some target objects to be configured. Any collections or arrays in the given parameters will be flattened, and the script applied to each object in the result, in the order given. Each call to this method adds some additional target objects.
- Parameters:
targets- The target objects.- Returns:
- this
-
from
ObjectConfigurationAction from(java.lang.Object script)
Adds a script to use to configure the target objects. You can call this method multiple times, to use multiple scripts. Scripts and plugins are applied in the order that they are added.- Parameters:
script- The script. Evaluated as perProject.file(Object). However, note that a URL can also be used, allowing the script to be fetched using HTTP, for example.- Returns:
- this
-
plugin
ObjectConfigurationAction plugin(java.lang.Class<? extends Plugin> pluginClass)
Adds aPluginto use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.- Parameters:
pluginClass- The plugin to apply.- Returns:
- this
-
type
ObjectConfigurationAction type(java.lang.Class<?> pluginClass)
Adds the plugin implemented by the given class to the target.The class is expected to either implement
Plugin, or extendRuleSource. An exception will be thrown if the class is not a valid plugin implementation.- Parameters:
pluginClass- the plugin to apply- Returns:
- this
-
plugin
ObjectConfigurationAction plugin(java.lang.String pluginId)
Adds aPluginto use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.- Parameters:
pluginId- The id of the plugin to apply.- Returns:
- this
-
-