Class ProjectPlugin

java.lang.Object
com.diffplug.gradle.ProjectPlugin
All Implemented Interfaces:
Plugin<Project>
Direct Known Subclasses:
AsMavenPlugin, BndManifestPlugin, BuildPropertiesPlugin, EquinoxLaunchPlugin, ExcludeBuildFolderPlugin, MavenCentralPlugin, NativeDepsPlugin, OomphIdePlugin, ProjectDepsPlugin, ResourceFiltersPlugin

public abstract class ProjectPlugin extends Object implements Plugin<Project>
Base implementation of a Plugin which prevents double-application.
  • Constructor Details

    • ProjectPlugin

      public ProjectPlugin()
  • Method Details

    • apply

      public final void apply(Project project)
      Specified by:
      apply in interface Plugin<Project>
    • applyOnce

      protected abstract void applyOnce(Project project)
      Plugin application, which is guaranteed to execute only once.
    • getPlugin

      @Deprecated public static <T extends Plugin<?>> T getPlugin(Project project, Class<T> pluginClazz)
      Deprecated.
      Returns the instance of the given plugin, by returning the existing or applying brand new, as appropriate.
    • treeDef

      public static com.diffplug.common.tree.TreeDef.Parented<Project> treeDef()
      A TreeDef for projects.