gradle
8.4

# GradlePluginDevelopmentExtension

abstract class GradlePluginDevelopmentExtension(source)

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.

        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'
                }
            }
        }

Content copied to clipboard

#### See also

JavaGradlePluginPlugin

## Constructors

GradlePluginDevelopmentExtension
Link copied to clipboard
constructor(project: Project, pluginSourceSet: SourceSet, testSourceSet: SourceSet)
constructor(project: Project, pluginSourceSet: SourceSet, testSourceSets: Array<SourceSet>)

## Properties

plugins
Link copied to clipboard
val plugins: NamedDomainObjectContainer<PluginDeclaration>
pluginSourceSet
Link copied to clipboard
open val pluginSourceSet: SourceSet
vcsUrl
Link copied to clipboard
@get:Incubating
val vcsUrl: Property<String>
website
Link copied to clipboard
@get:Incubating
val website: Property<String>

## Functions

getTestSourceSets
Link copied to clipboard
open fun getTestSourceSets(): Set<SourceSet>
Returns the source sets executing the functional tests with TestKit.
isAutomatedPublishing
Link copied to clipboard
open fun isAutomatedPublishing(): Boolean
Whether the plugin should automatically configure the publications for the plugins.
plugins
Link copied to clipboard
open fun plugins(action: Action<out Any>)
Configures the declared plugins.
pluginSourceSet
Link copied to clipboard
open fun pluginSourceSet(pluginSourceSet: SourceSet)
Provides the source set that compiles the code under test.
setAutomatedPublishing
Link copied to clipboard
open fun setAutomatedPublishing(automatedPublishing: Boolean)
Configures whether the plugin should automatically configure the publications for the plugins.
testSourceSet
Link copied to clipboard
@Incubating
open fun testSourceSet(testSourceSet: SourceSet)
Adds some source sets to the collection which will be using TestKit.
testSourceSets
Link copied to clipboard
open fun testSourceSets(testSourceSets: Array<SourceSet>)
Provides the source sets executing the functional tests with TestKit.