Package: org.gradle.plugin.devel

## [Java] Class GradlePluginDevelopmentExtension

- org.gradle.plugin.devel.GradlePluginDevelopmentExtension

- Configuration options for the org.gradle.plugin.devel.plugins.JavaGradlePluginPlugin.

  Below is a full configuration example. Since all properties have sensible defaults, typically only selected properties will be configured.

           apply plugin: "java-gradle-plugin"

           gradlePlugin {
               pluginSourceSet project.sourceSets.customMain
               testSourceSets project.sourceSets.functionalTest
               plugins {
                   helloPlugin {
                       id  = 'org.example.hello'
                       implementationClass = 'org.example.HelloPlugin'
                   }
               }
           }

  See Also:
    org.gradle.plugin.devel.plugins.JavaGradlePluginPlugin
  Since:
    2.13

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GradlePluginDevelopmentExtension (Project project, SourceSet pluginSourceSet, SourceSet testSourceSet)`
    `GradlePluginDevelopmentExtension (Project project, SourceSet pluginSourceSet, SourceSet[] testSourceSets)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `SourceSet` | `getPluginSourceSet()` Returns the source set that compiles the code under test.
    `NamedDomainObjectContainer<PluginDeclaration>` | `getPlugins()` Returns the declared plugins.
    `Set<SourceSet>` | `getTestSourceSets()` Returns the the source sets executing the functional tests with TestKit.
    `boolean` | `isAutomatedPublishing()` Whether the plugin should automatically configure the publications for the plugins.
    `void` | `pluginSourceSet(SourceSet pluginSourceSet)` Provides the source set that compiles the code under test.
    `void` | `plugins(Action<? super NamedDomainObjectContainer<PluginDeclaration>> action)` Configures the declared plugins.
    `void` | `setAutomatedPublishing(boolean automatedPublishing)` Configures whether the plugin should automatically configure the publications for the plugins.
    `void` | `testSourceSets(SourceSet... testSourceSets)` Provides the source sets executing the functional tests with TestKit.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public GradlePluginDevelopmentExtension(Project project, SourceSet pluginSourceSet, SourceSet testSourceSet)

    - #### public GradlePluginDevelopmentExtension(Project project, SourceSet pluginSourceSet, SourceSet[] testSourceSets)

  - ### Method Detail

    - #### public SourceSet getPluginSourceSet()

      Returns the source set that compiles the code under test. Defaults to `project.sourceSets.main`.

      Returns:
        the plugin source set

    - #### public NamedDomainObjectContainer<PluginDeclaration> getPlugins()

      Returns the declared plugins.

      Returns:
        the declared plugins, never null

    - #### public Set<SourceSet> getTestSourceSets()

      Returns the the source sets executing the functional tests with TestKit. Defaults to `project.sourceSets.test`.

      Returns:
        the test source sets

    - #### public boolean isAutomatedPublishing()

      Whether the plugin should automatically configure the publications for the plugins.

      Returns:
        true if publishing should be automated, false otherwise

    - #### public void pluginSourceSet(SourceSet pluginSourceSet)

      Provides the source set that compiles the code under test.

      Parameters:
        `pluginSourceSet` - the plugin source set

    - #### public void plugins(Action<? super NamedDomainObjectContainer<PluginDeclaration>> action)

      Configures the declared plugins.

      Parameters:
        `action` - the configuration action to invoke on the plugins

    - #### public void setAutomatedPublishing(boolean automatedPublishing)

      Configures whether the plugin should automatically configure the publications for the plugins.

      Parameters:
        `automatedPublishing` - whether to automated publication

    - #### public void testSourceSets(SourceSet... testSourceSets)

      Provides the source sets executing the functional tests with TestKit.

      Calling this method multiple times with different source sets is not additive.

      Parameters:
        `testSourceSets` - the test source sets