public class GradlePluginDevelopmentExtension
extends java.lang.Object
JavaGradlePluginPlugin
.
Below is a full configuration example. Since all properties have sensible defaults, typically only selected properties will be configured.
plugins { id 'java-gradle-plugin' } sourceSets { customMain functionalTest } 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.
|
java.util.Set<SourceSet> |
getTestSourceSets() |
Returns the source sets executing the functional tests with TestKit.
|
Property<java.lang.String> |
getVcsUrl() |
Returns the property holding the URL for the plugin's VCS repository.
|
Property<java.lang.String> |
getWebsite() |
Returns the property holding the URL for the plugin's website.
|
boolean |
isAutomatedPublishing() |
Deprecated.
non-automatic publishing of plugins will no longer be supported
|
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) |
Deprecated.
non-automatic publishing of plugins will no longer be supported
|
void |
testSourceSet(SourceSet testSourceSet) |
Adds some source sets to the collection which will be using TestKit.
|
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 set@Incubating public void testSourceSet(SourceSet testSourceSet)
testSourceSet
- the test source set to addpublic void testSourceSets(SourceSet... testSourceSets)
Calling this method multiple times with different source sets is NOT additive. Calling this method will overwrite any existing test source sets with the provided arguments.
testSourceSets
- the test source setspublic SourceSet getPluginSourceSet()
project.sourceSets.main
.public java.util.Set<SourceSet> getTestSourceSets()
project.sourceSets.test
.@Incubating public Property<java.lang.String> getWebsite()
@Incubating public Property<java.lang.String> getVcsUrl()
public NamedDomainObjectContainer<PluginDeclaration> getPlugins()
public void plugins(Action<? super NamedDomainObjectContainer<PluginDeclaration>> action)
action
- the configuration action to invoke on the plugins@Deprecated public boolean isAutomatedPublishing()
@Deprecated public void setAutomatedPublishing(boolean automatedPublishing)
automatedPublishing
- whether to automated publication