Package org.gradle.plugin.devel.plugins

# Class JavaGradlePluginPlugin

java.lang.Object
org.gradle.plugin.devel.plugins.JavaGradlePluginPlugin

All Implemented Interfaces:
  `Plugin<Project>`

@NullMarked public abstract class JavaGradlePluginPlugin extends Object implements Plugin<Project>
A plugin for building java gradle plugins. Automatically generates plugin descriptors. Emits warnings for common error conditions.

Provides a direct integration with TestKit by declaring the `gradleTestKit()` dependency for the test compile configuration and a dependency on the plugin classpath manifest generation task for the test runtime configuration. Default conventions can be customized with the help of `GradlePluginDevelopmentExtension`. Integrates with the 'maven-publish' and 'ivy-publish' plugins to automatically publish the plugins so they can be resolved using the `pluginRepositories` and `plugins` DSL.

See Also:
  - Gradle plugin development reference

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `(package private) static class`
  `JavaGradlePluginPlugin.ClassManifestCollectorAction`
  A file copy action that collects class file paths as they are added to the jar.
  `(package private) static class`
  `JavaGradlePluginPlugin.PluginDescriptorCollectorAction`
  A file copy action that collects plugin descriptors as they are added to the jar.
  `(package private) static class`
  `JavaGradlePluginPlugin.PluginValidationAction`
  Implements plugin validation tasks to validate that a proper plugin jar is produced.
  `(package private) static class`
  `JavaGradlePluginPlugin.PluginValidationActionsState`
  A state shared by the validation process.
  `(package private) static class`
  `JavaGradlePluginPlugin.TestKitAndPluginClasspathDependenciesAction`
  An action that automatically declares the TestKit dependency for the test compile configuration and a dependency on the plugin classpath manifest generation task for the test runtime configuration.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `(package private) static final String`
  `API_CONFIGURATION`
  Deprecated.
  `(package private) static final String`
  `BAD_IMPL_CLASS_WARNING_MESSAGE`
  `(package private) static final String`
  `CLASSES_PATTERN`
  `(package private) static final String`
  `DECLARATION_MISSING_ID_MESSAGE`
  `(package private) static final String`
  `DECLARATION_MISSING_IMPLEMENTATION_MESSAGE`
  `(package private) static final String`
  `DECLARED_PLUGIN_MISSING_MESSAGE`
  `(package private) static final org.gradle.internal.buildoption.InternalOption<Boolean>`
  `EXPERIMENTAL_SUPPRESS_GRADLE_API_PROPERTY`
  Suppress adding the `DependencyHandler#gradleApi()` dependency.
  `(package private) static final String`
  `EXTENSION_NAME`
  `(package private) static final String`
  `GENERATE_PLUGIN_DESCRIPTORS_TASK_DESCRIPTION`
  The description for the task generating plugin descriptors from plugin declarations.
  `(package private) static final String`
  `GENERATE_PLUGIN_DESCRIPTORS_TASK_NAME`
  `(package private) static final String`
  `GRADLE_PLUGINS`
  `(package private) static final String`
  `INVALID_DESCRIPTOR_WARNING_MESSAGE`
  `(package private) static final String`
  `JAR_TASK`
  `(package private) static final String`
  `NO_DESCRIPTOR_WARNING_MESSAGE`
  `(package private) static final String`
  `PLUGIN_DESCRIPTOR_PATTERN`
  `(package private) static final String`
  `PLUGIN_DEVELOPMENT_GROUP`
  The task group used for tasks created by the Java Gradle plugin development plugin.
  `(package private) static final String`
  `PLUGIN_UNDER_TEST_METADATA_TASK_DESCRIPTION`
  The description for the task generating metadata for plugin functional tests.
  `(package private) static final String`
  `PLUGIN_UNDER_TEST_METADATA_TASK_NAME`
  `(package private) static final String`
  `PROCESS_RESOURCES_TASK`
  `(package private) static final String`
  `VALIDATE_PLUGIN_TASK_DESCRIPTION`
  The description for the task validating the plugin.
  `(package private) static final String`
  `VALIDATE_PLUGINS_TASK_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavaGradlePluginPlugin()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(Project project)`
  Apply this plugin to the given target object.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### API_CONFIGURATION

    @Deprecated static final String API_CONFIGURATION
    Deprecated.
    See Also:
      - Constant Field Values

  - ### JAR_TASK

    static final String JAR_TASK
    See Also:
      - Constant Field Values

  - ### PROCESS_RESOURCES_TASK

    static final String PROCESS_RESOURCES_TASK
    See Also:
      - Constant Field Values

  - ### GRADLE_PLUGINS

    static final String GRADLE_PLUGINS
    See Also:
      - Constant Field Values

  - ### PLUGIN_DESCRIPTOR_PATTERN

    static final String PLUGIN_DESCRIPTOR_PATTERN
    See Also:
      - Constant Field Values

  - ### CLASSES_PATTERN

    static final String CLASSES_PATTERN
    See Also:
      - Constant Field Values

  - ### BAD_IMPL_CLASS_WARNING_MESSAGE

    static final String BAD_IMPL_CLASS_WARNING_MESSAGE
    See Also:
      - Constant Field Values

  - ### INVALID_DESCRIPTOR_WARNING_MESSAGE

    static final String INVALID_DESCRIPTOR_WARNING_MESSAGE
    See Also:
      - Constant Field Values

  - ### NO_DESCRIPTOR_WARNING_MESSAGE

    static final String NO_DESCRIPTOR_WARNING_MESSAGE
    See Also:
      - Constant Field Values

  - ### DECLARED_PLUGIN_MISSING_MESSAGE

    static final String DECLARED_PLUGIN_MISSING_MESSAGE
    See Also:
      - Constant Field Values

  - ### DECLARATION_MISSING_ID_MESSAGE

    static final String DECLARATION_MISSING_ID_MESSAGE
    See Also:
      - Constant Field Values

  - ### DECLARATION_MISSING_IMPLEMENTATION_MESSAGE

    static final String DECLARATION_MISSING_IMPLEMENTATION_MESSAGE
    See Also:
      - Constant Field Values

  - ### EXTENSION_NAME

    static final String EXTENSION_NAME
    See Also:
      - Constant Field Values

  - ### PLUGIN_UNDER_TEST_METADATA_TASK_NAME

    static final String PLUGIN_UNDER_TEST_METADATA_TASK_NAME
    See Also:
      - Constant Field Values

  - ### GENERATE_PLUGIN_DESCRIPTORS_TASK_NAME

    static final String GENERATE_PLUGIN_DESCRIPTORS_TASK_NAME
    See Also:
      - Constant Field Values

  - ### VALIDATE_PLUGINS_TASK_NAME

    static final String VALIDATE_PLUGINS_TASK_NAME
    See Also:
      - Constant Field Values

  - ### EXPERIMENTAL_SUPPRESS_GRADLE_API_PROPERTY

    static final org.gradle.internal.buildoption.InternalOption<Boolean> EXPERIMENTAL_SUPPRESS_GRADLE_API_PROPERTY
    Suppress adding the `DependencyHandler#gradleApi()` dependency. Experimental property used to test using an external Gradle API dependency.

  - ### PLUGIN_DEVELOPMENT_GROUP

    static final String PLUGIN_DEVELOPMENT_GROUP
    The task group used for tasks created by the Java Gradle plugin development plugin.
    Since:
      4.0
    See Also:
      - Constant Field Values

  - ### PLUGIN_UNDER_TEST_METADATA_TASK_DESCRIPTION

    static final String PLUGIN_UNDER_TEST_METADATA_TASK_DESCRIPTION
    The description for the task generating metadata for plugin functional tests.
    Since:
      4.0
    See Also:
      - Constant Field Values

  - ### GENERATE_PLUGIN_DESCRIPTORS_TASK_DESCRIPTION

    static final String GENERATE_PLUGIN_DESCRIPTORS_TASK_DESCRIPTION
    The description for the task generating plugin descriptors from plugin declarations.
    Since:
      4.0
    See Also:
      - Constant Field Values

  - ### VALIDATE_PLUGIN_TASK_DESCRIPTION

    static final String VALIDATE_PLUGIN_TASK_DESCRIPTION
    The description for the task validating the plugin.
    Since:
      6.0
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### JavaGradlePluginPlugin

    public JavaGradlePluginPlugin()

- ## Method Details

  - ### apply

    public void apply(Project project)
    Description copied from interface: `Plugin`
    Apply this plugin to the given target object.
    Specified by:
      `apply` in interface `Plugin<Project>`
    Parameters:
      `project` - The target object