Interface PluginAware

  • All Known Subinterfaces:
    Gradle, Project, Settings

    public interface PluginAware
    Something that can have plugins applied to it.

    The plugin manager can be used for applying and detecting whether plugins have been applied.

    For more on writing and applying plugins, see Plugin.

    • Method Detail

      • apply

        void apply​(java.util.Map<java.lang.String,​?> options)
        Applies a plugin or script, using the given options provided as a map. Does nothing if the plugin has already been applied.

        The given map is applied as a series of method calls to a newly created ObjectConfigurationAction. That is, each key in the map is expected to be the name of a method ObjectConfigurationAction and the value to be compatible arguments to that method.

        The following options are available:

        • from: A script to apply. Accepts any path supported by Project.uri(Object).
        • plugin: The id or implementation class of the plugin to apply.
        • to: The target delegate object or objects. The default is this plugin aware object. Use this to configure objects other than this object.
        Parameters:
        options - the options to use to configure and ObjectConfigurationAction before “executing” it
      • getPluginManager

        PluginManager getPluginManager()
        The plugin manager for this plugin aware object.
        Returns:
        the plugin manager
        Since:
        2.3