public class GradlePluginDevelopmentExtension extends Object
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'
             }
         }
     }
 JavaGradlePluginPlugin| Constructor | Description | 
|---|---|
| GradlePluginDevelopmentExtension(Project project,
                                SourceSet pluginSourceSet,
                                SourceSet testSourceSet) | |
| GradlePluginDevelopmentExtension(Project project,
                                SourceSet pluginSourceSet,
                                SourceSet[] testSourceSets) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| NamedDomainObjectContainer<PluginDeclaration> | getPlugins() | Returns the declared plugins. | 
| SourceSet | getPluginSourceSet() | Returns the source set that compiles the code under test. | 
| Set<SourceSet> | getTestSourceSets() | Returns the source sets executing the functional tests with TestKit. | 
| boolean | isAutomatedPublishing() | Whether the plugin should automatically configure the publications for the plugins. | 
| void | plugins(Action<? super NamedDomainObjectContainer<PluginDeclaration>> action) | Configures the declared plugins. | 
| void | pluginSourceSet(SourceSet pluginSourceSet) | Provides the source set that compiles the code under test. | 
| 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. | 
public GradlePluginDevelopmentExtension(Project project, SourceSet pluginSourceSet, SourceSet testSourceSet)
public void pluginSourceSet(SourceSet pluginSourceSet)
pluginSourceSet - the plugin source setpublic void testSourceSets(SourceSet... testSourceSets)
Calling this method multiple times with different source sets is not additive.
testSourceSets - the test source setspublic SourceSet getPluginSourceSet()
project.sourceSets.main.public Set<SourceSet> getTestSourceSets()
project.sourceSets.test.public NamedDomainObjectContainer<PluginDeclaration> getPlugins()
public void plugins(Action<? super NamedDomainObjectContainer<PluginDeclaration>> action)
action - the configuration action to invoke on the pluginspublic boolean isAutomatedPublishing()
public void setAutomatedPublishing(boolean automatedPublishing)
automatedPublishing - whether to automated publication