Interface ProjectPlugin

  • All Superinterfaces:
    org.gradle.api.Plugin<org.gradle.api.Project>

    public interface ProjectPlugin
    extends org.gradle.api.Plugin<org.gradle.api.Project>
    A more friendly interface for creating a Plugin that operates on a Project.

    Implementations should override the non-deprecated overload of apply, but until Convention is removed, either will work.

    Since:
    1.0.0
    • Method Summary

      All Methods Instance Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      default void apply​(@NotNull org.gradle.api.Project project)  
      default void apply​(@NotNull org.gradle.api.Project project, @NotNull org.gradle.api.plugins.PluginContainer plugins, @NotNull org.gradle.api.plugins.ExtensionContainer extensions, @NotNull org.gradle.api.plugins.Convention convention, @NotNull org.gradle.api.tasks.TaskContainer tasks)
      Deprecated.
      default void apply​(@NotNull org.gradle.api.Project project, @NotNull org.gradle.api.plugins.PluginContainer plugins, @NotNull org.gradle.api.plugins.ExtensionContainer extensions, @NotNull org.gradle.api.tasks.TaskContainer tasks)
      Applies the plugin.
      default @Nullable org.gradle.util.GradleVersion minimumGradleVersion()
      Return a minimum Gradle version required to use this plugin.
    • Method Detail

      • apply

        default void apply​(@NotNull
                           @NotNull org.gradle.api.Project project)
        Specified by:
        apply in interface org.gradle.api.Plugin<org.gradle.api.Project>
      • apply

        @Deprecated
        default void apply​(@NotNull
                           @NotNull org.gradle.api.Project project,
                           @NotNull
                           @NotNull org.gradle.api.plugins.PluginContainer plugins,
                           @NotNull
                           @NotNull org.gradle.api.plugins.ExtensionContainer extensions,
                           @NotNull
                           @NotNull org.gradle.api.plugins.Convention convention,
                           @NotNull
                           @NotNull org.gradle.api.tasks.TaskContainer tasks)
        Deprecated.
        Applies the plugin.
        Parameters:
        project - the project
        plugins - the plugin container
        extensions - the extension container
        convention - the convention
        tasks - the task container
        Since:
        1.0.0
      • apply

        default void apply​(@NotNull
                           @NotNull org.gradle.api.Project project,
                           @NotNull
                           @NotNull org.gradle.api.plugins.PluginContainer plugins,
                           @NotNull
                           @NotNull org.gradle.api.plugins.ExtensionContainer extensions,
                           @NotNull
                           @NotNull org.gradle.api.tasks.TaskContainer tasks)
        Applies the plugin.
        Parameters:
        project - the project
        plugins - the plugin container
        extensions - the extension container
        tasks - the task container
        Since:
        1.1.0
      • minimumGradleVersion

        @Nullable
        default @Nullable org.gradle.util.GradleVersion minimumGradleVersion()
        Return a minimum Gradle version required to use this plugin.
        Returns:
        the minimum required version
        Since:
        1.2.0