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' } } }
Constructor and description |
---|
GradlePluginDevelopmentExtension
(Project project, SourceSet pluginSourceSet, SourceSet testSourceSet) |
GradlePluginDevelopmentExtension
(Project project, SourceSet pluginSourceSet, SourceSet[] testSourceSets) |
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. |
Returns the source set that compiles the code under test. Defaults to project.sourceSets.main
.
Returns the declared plugins.
Returns the the source sets executing the functional tests with TestKit. Defaults to project.sourceSets.test
.
Whether the plugin should automatically configure the publications for the plugins.
Provides the source set that compiles the code under test.
pluginSourceSet
- the plugin source setConfigures the declared plugins.
action
- the configuration action to invoke on the pluginsConfigures whether the plugin should automatically configure the publications for the plugins.
automatedPublishing
- whether to automated publicationProvides the source sets executing the functional tests with TestKit.
Calling this method multiple times with different source sets is not additive.
testSourceSets
- the test source sets