# Project

API Documentation: | `Project`

This interface is the main API you use to interact with Gradle from your build file. From a `Project`, you have programmatic access to all of Gradle's features.

### Lifecycle

There is a one-to-one relationship between a `Project` and a ``build.gradle`` file. During build initialisation, Gradle assembles a `Project` object for each project which is to participate in the build, as follows:

- Create a `Settings` instance for the build.
- Evaluate the ``settings.gradle`` script, if present, against the `Settings` object to configure it.
- Use the configured `Settings` object to create the hierarchy of `Project` instances.
- Finally, evaluate each `Project` by executing its ``build.gradle`` file, if present, against the project. The project are evaulated in breadth-wise order, such that a project is evaulated before its child projects. This order can be overridden by adding an evaluation dependency.

### Tasks

A project is essentially a collection of `Task` objects. Each task performs some basic piece of work, such as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the `add()` methods on `TaskContainer`, such as `TaskContainer.add()`. You can locate existing tasks using one of the lookup methods on `TaskContainer`, such as `TaskCollection.getByName()`.

### Dependencies

A project generally has a number of dependencies it needs in order to do its work. Also, a project generally produces a number of artifacts, which other projects can use. Those dependencies are grouped in configurations, and can be retrieved and uploaded from repositories. You use the `ConfigurationContainer` returned by `Project.getConfigurations()` method to manage the configurations. The `DependencyHandler` returned by `Project.getDependencies()` method to manage the dependencies. The `ArtifactHandler` returned by `Project.getArtifacts()` method to manage the artifacts. The `RepositoryHandler` returned by `Project.getRepositories()` method to manage the repositories.

### Multi-project Builds

Projects are arranged into a hierarchy of projects. A project has a name, and a fully qualified path which uniquely identifies it in the hierarchy.

### Build scripts

Gradle executes the project's build file against the `Project` instance to configure the project. Any property or method which your script uses which is not defined in the script is delegated through to the associated `Project` object. This means, that you can use any of the methods and properties on the `Project` interface directly in your script.

For example:

    defaultTasks('some-task')  // Delegates to Project.defaultTasks()
    reportDir = file('reports') // Delegates to Project.file() and Project.setProperty()

You can also access the `Project` instance using the `project` property. This can make the script clearer in some cases. For example, you could use `project.name` rather than `name` to access the project's name.

#### Dynamic Properties

A project has 5 property 'scopes', which it searches for properties. You can access these properties by name in your build file, or by calling the project's `Project.property()` method. The scopes are:

- The `Project` object itself. This scope includes any property getters and setters declared by the `Project` implementation class. For example, `Project.getRootProject()` is accessible as the `rootProject` property. The properties of this scope are readable or writable depending on the presence of the corresponding getter or setter method.
- The additional properties of the project. Each project maintains a map of additional properties, which can contain any arbitrary name -> value pair. The properties of this scope are readable and writable.
- The convention properties added to the project by each `Plugin` applied to the project. A `Plugin` can add properties and methods to a project through the project's `Convention` object. The properties of this scope may be readable or writable, depending on the convention objects.
- The tasks of the project. A task is accessible by using its name as a property name. The properties of this scope are read-only. For example, a task called `compile` is accessible as the `compile` property.
- The additional properties and convention properties of the project's parent project, recursively up to the root project. The properties of this scope are read-only.

When reading a property, the project searches the above scopes in order, and returns the value from the first scope it finds the property in. See `Project.property()` for more details.

When writing a property, the project searches the above scopes in order, and sets the property in the first scope it finds the property in. If not found, the project adds the property to its map of additional properties. See `Project.setProperty()` for more details.

#### Dynamic Methods

A project has 5 method 'scopes', which it searches for methods:

- The `Project` object itself.
- The build file. The project searches for a matching method declared in the build file.
- The convention methods added to the project by each `Plugin` applied to the project. A `Plugin` can add properties and method to a project through the project's `Convention` object.
- The tasks of the project. A method is added for each task, using the name of the task as the method name and taking a single closure parameter. The method calls the `Task.configure()` method for the associated task with the provided closure. For example, if the project has a task called `compile`, then a method is added with the following signature: `void compile(Closure configureClosure)`.
- The parent project, recursively up to the root project.

### Properties

Property | Description
`allprojects` | The set containing this project and its subprojects.
`ant` | The `AntBuilder` for this project. You can use this in your build file to execute ant tasks.
`artifacts` | Returns a handler for assigning artifacts produced by the project to configurations.
`buildDir` | The build directory of this project. The build directory is the directory which all artifacts are generated into. The default value for the build directory is `projectDir/build`
`buildFile` | The build file Gradle will evaluate against this project object. The default is ``build.gradle``. If an embedded script is provided the build file will be null.
`buildscript` | The build script handler for this project. You can use this handler to query details about the build script for this project, and manage the classpath used to compile and execute the project's build script.
`childProjects` | The direct children of this project.
`configurations` | The configurations of this project.
`convention` | The `Convention` for this project.
`defaultTasks` | The names of the default tasks of this project. These are used when no tasks names are provided when starting the build.
`dependencies` | The dependency handler of this project. The returned dependency handler instance can be used for adding new dependencies. For accessing already declared dependencies, the configurations can be used.
`dependsOnProjects` | The set of projects which this project depends on.
`description` | The description of this project.
`gradle` | The `Gradle` invocation which this project belongs to.
`group` | The group of this project. Gradle always uses the `toString()` value of the group. The group defaults to the path with dots a separators.
`logger` | The logger for this project. You can use this in your build file to write log messages.
`logging` | The `LoggingManager` which can be used to control the logging level and standard output/error capture for this project's build script. By default, System.out is redirected to the Gradle logging system at the QUIET log level, and System.err is redirected at the ERROR log level.
`name` | The name of this project. The project's name is not necessarily unique within a project hierarchy. You should use the `Project.getPath()` method for a unique identifier for the project.
`parent` | The parent project of this project, if any.
`path` | The path of this project. The path is the fully qualified name of the project.
`plugins` | The plugins container for this project. The returned container can be used to manage the plugins which are used by this project.
`project` | Returns this project. This method is useful in build files to explicitly access project properties and methods. For example, using `project.name` can express your intent better than using `name`. This method also allows you to access project properties from a scope where the property may be hidden, such as, for example, from a method or closure.
`projectDir` | The directory containing the project build file.
`properties` | The properties of this project. See here for details of the properties which are available for a project.
`repositories` | Returns a handler to create repositories which are used for retrieving dependencies and uploading artifacts produced by the project.
`rootDir` | The root directory of this project. The root directory is the project directory of the root project.
`rootProject` | The root project for the hierarchy that this project belongs to. In the case of a single-project build, this method returns this project.
`state` | The evaluation state of this project. You can use this to access information about the evaluation of this project, such as whether it has failed.
`status` | The status of this project. Gradle always uses the `toString()` value of the status. The status defaults to `release`.
`subprojects` | The set containing the subprojects of this project.
`tasks` | The tasks of this project.
`version` | The version of this project. Gradle always uses the `toString()` value of the version. The version defaults to `unspecified`.

#### Properties added by the `announce` plugin

Property | Description
`password` | The password to use for announcements.
`username` | The username to use for announcements.

#### Properties added by the `application` plugin

Property | Description
`applicationDistribution` | The specification of the contents of the distribution.
`applicationName` | The name of the application.
`mainClassName` | The fully qualified name of the application's main class.

#### Properties added by the `code-quality` plugin

Property | Description
`checkstyleConfigFile` | The Checkstyle configuration file.
`checkstyleConfigFileName` | The name of the Checkstyle configuration file, relative to the project directory.
`checkstyleProperties` | The set of properties to substitute into the Checkstyle configuration file.
`checkstyleResultsDir` | The directory to write the Checkstyle results into.
`checkstyleResultsDirName` | The name of the directory to write Checkstyle results to, relative to the build directory.
`codeNarcConfigFile` | The CodeNarc configuration file.
`codeNarcConfigFileName` | The name of the CodeNarc configuration file, relative to the project directory.
`codeNarcReportsDir` | The directory to write CodeNarc reports into.
`codeNarcReportsDirName` | The name of the directory to write CodeNarc reports into.

#### Properties added by the `ear` plugin

Property | Description
`appDirName` | The name of the application directory, relative to the project directory. Default is "src/main/application".
`deploymentDescriptor` | A custom deployment descriptor configuration. Default is an "application.xml" with sensible defaults.
`libDirName` | The name of the library directory in the EAR file. Default is "lib".

#### Properties added by the `java` plugin

Property | Description
`apiDocTitle` | The title for API documentation for the project.
`archivesBaseName` | The base name to use for archive files.
`distsDir` | The directory to generate TAR and ZIP archives into.
`distsDirName` | The name for the distributions directory. This in interpreted relative to the project' build directory.
`docsDir` | Returns a file pointing to the root directory supposed to be used for all docs.
`docsDirName` | The name of the docs directory. Can be a name or a path relative to the build dir.
`libsDir` | The directory to generate JAR and WAR archives into.
`libsDirName` | The name for the libs directory. This in interpreted relative to the project' build directory.
`reportsDir` | The directory containing all reports for this project.
`reportsDirName` | The name of the reports directory, relative to the project's build directory.
`sourceCompatibility` | The source compatibility used for compiling Java sources.
`sourceSets` | The source sets container.
`targetCompatibility` | The target compatibility used for compiling Java sources.
`testReportDir` | Returns a file pointing to the root directory to be used for reports.
`testReportDirName` | The name of the test reports directory. Can be a name or a path relative to the build dir.
`testResultsDir` | Returns a file pointing to the root directory of the test results.
`testResultsDirName` | The name of the test results directory. Can be a name or a path relative to the build dir.

#### Properties added by the `jetty` plugin

Property | Description
`httpPort` | The TCP port for Jetty to listen on for incoming HTTP requests.
`stopKey` | The key to use to stop Jetty.
`stopPort` | The TCP port for Jetty to listen on for stop requests.

#### Properties added by the `maven` plugin

Property | Description
`conf2ScopeMappings` | The set of rules for how to map Gradle dependencies to Maven scopes.
`pomDir` | The directory to generate Maven POMs into.
`pomDirName` | The name of the directory to generate Maven POMs into, relative to the build directory.

#### Properties added by the `project-report` plugin

Property | Description
`projectReportDir` | The directory to generate the project reports into.
`projectReportDirName` | The name of the directory to generate the project reports into, relative to the project's reports dir.

#### Properties added by the `signing` plugin

Property | Description
`signing` | The `SigningSettings` for the project.

#### Properties added by the `war` plugin

Property | Description
`webAppDir` | The web application directory.
`webAppDirName` | The name of the web application directory, relative to the project directory.

### Property details

#### ``Set`<`Project`>` `allprojects` (read-only)

The set containing this project and its subprojects.

#### `AntBuilder` `ant` (read-only)

The `AntBuilder` for this project. You can use this in your build file to execute ant tasks.

#### `ArtifactHandler` `artifacts` (read-only)

Returns a handler for assigning artifacts produced by the project to configurations.

#### `File` `buildDir`

The build directory of this project. The build directory is the directory which all artifacts are generated into. The default value for the build directory is `projectDir/build`

#### `File` `buildFile` (read-only)

The build file Gradle will evaluate against this project object. The default is ``build.gradle``. If an embedded script is provided the build file will be null.

#### `ScriptHandler` `buildscript` (read-only)

The build script handler for this project. You can use this handler to query details about the build script for this project, and manage the classpath used to compile and execute the project's build script.

#### ``Map`<`String`, `Project`>` `childProjects` (read-only)

The direct children of this project.

#### `ConfigurationContainer` `configurations` (read-only)

The configurations of this project.

#### `Convention` `convention` (read-only)

The `Convention` for this project.

You can access this property in your build file using `convention`. You can also can also access the properties and methods of the convention object as if they were properties and methods of this project. See here for more details

#### ``List`<`String`>` `defaultTasks`

The names of the default tasks of this project. These are used when no tasks names are provided when starting the build.

#### `DependencyHandler` `dependencies` (read-only)

The dependency handler of this project. The returned dependency handler instance can be used for adding new dependencies. For accessing already declared dependencies, the configurations can be used.

#### ``Set`<`Project`>` `dependsOnProjects` (read-only)

The set of projects which this project depends on.

#### `String` `description`

The description of this project.

#### `Gradle` `gradle` (read-only)

The `Gradle` invocation which this project belongs to.

#### `Object` `group`

The group of this project. Gradle always uses the `toString()` value of the group. The group defaults to the path with dots a separators.

#### `Logger` `logger` (read-only)

The logger for this project. You can use this in your build file to write log messages.

#### `LoggingManager` `logging` (read-only)

The `LoggingManager` which can be used to control the logging level and standard output/error capture for this project's build script. By default, System.out is redirected to the Gradle logging system at the QUIET log level, and System.err is redirected at the ERROR log level.

#### `String` `name` (read-only)

The name of this project. The project's name is not necessarily unique within a project hierarchy. You should use the `Project.getPath()` method for a unique identifier for the project.

#### `Project` `parent` (read-only)

The parent project of this project, if any.

#### `String` `path` (read-only)

The path of this project. The path is the fully qualified name of the project.

#### `PluginContainer` `plugins` (read-only)

The plugins container for this project. The returned container can be used to manage the plugins which are used by this project.

#### `Project` `project` (read-only)

Returns this project. This method is useful in build files to explicitly access project properties and methods. For example, using `project.name` can express your intent better than using `name`. This method also allows you to access project properties from a scope where the property may be hidden, such as, for example, from a method or closure.

#### `File` `projectDir` (read-only)

The directory containing the project build file.

#### ``Map`<`String`, ?>` `properties` (read-only)

The properties of this project. See here for details of the properties which are available for a project.

#### `RepositoryHandler` `repositories` (read-only)

Returns a handler to create repositories which are used for retrieving dependencies and uploading artifacts produced by the project.

#### `File` `rootDir` (read-only)

The root directory of this project. The root directory is the project directory of the root project.

#### `Project` `rootProject` (read-only)

The root project for the hierarchy that this project belongs to. In the case of a single-project build, this method returns this project.

#### `ProjectState` `state` (read-only)

The evaluation state of this project. You can use this to access information about the evaluation of this project, such as whether it has failed.

#### `Object` `status`

The status of this project. Gradle always uses the `toString()` value of the status. The status defaults to `release`.

The status of the project is only relevant, if you upload libraries together with a module descriptor. The status specified here, will be part of this module descriptor.

#### ``Set`<`Project`>` `subprojects` (read-only)

The set containing the subprojects of this project.

#### `TaskContainer` `tasks` (read-only)

The tasks of this project.

#### `Object` `version`

The version of this project. Gradle always uses the `toString()` value of the version. The version defaults to `unspecified`.

#### `String` `password`

The password to use for announcements.

Default with `announce` plugin:
  `null`

#### `String` `username`

The username to use for announcements.

Default with `announce` plugin:
  `null`

#### `CopySpec` `applicationDistribution`

The specification of the contents of the distribution.

Use this `CopySpec` to include extra files/resource in the application distribution.

    apply plugin: 'application'

    applicationDistribution.from("some/dir") {
      include "*.txt"
    }

Note that the application plugin pre configures this spec to; include the contents of "`src/dir`", copy the application start scripts into the "`bin`" directory, and copy the built jar and its dependencies into the "`lib`" directory.

Default value:
  A copy spec that; includes all of the contents of `src/dist`, copies the start scripts into `bin`, and copies the built jar and all dependencies into `lib`

#### `String` `applicationName`

The name of the application.

Default value:
  `project.name`

#### `String` `mainClassName`

The fully qualified name of the application's main class.

Default value:
  `null`

#### `File` `checkstyleConfigFile` (read-only)

The Checkstyle configuration file.

Default with `code-quality` and `java` plugin:
  ``${project.projectDir}`/`${project.checkstyleConfigFileName}``

#### `String` `checkstyleConfigFileName`

The name of the Checkstyle configuration file, relative to the project directory.

Default with `code-quality` and `java` plugin:
  `'config/checkstyle/checkstyle.xml'`

#### ``Map`<`String`, `Object`>` `checkstyleProperties`

The set of properties to substitute into the Checkstyle configuration file.

Default with `code-quality` and `java` plugin:
  `[:]`

#### `File` `checkstyleResultsDir` (read-only)

The directory to write the Checkstyle results into.

Default with `code-quality` and `java` plugin:
  ``${project.buildDir}`/`${project.checkstyleResultsDirName}``

#### `String` `checkstyleResultsDirName`

The name of the directory to write Checkstyle results to, relative to the build directory.

Default with `code-quality` and `java` plugin:
  `checkstyle`

#### `File` `codeNarcConfigFile` (read-only)

The CodeNarc configuration file.

Default with `code-quality` and `groovy` plugin:
  ``${project.projectDir}`/`${project.codeNarcConfigFileName}``

#### `String` `codeNarcConfigFileName`

The name of the CodeNarc configuration file, relative to the project directory.

Default with `code-quality` and `groovy` plugin:
  `'config/codenarc/codenarc.xml'`

#### `File` `codeNarcReportsDir` (read-only)

The directory to write CodeNarc reports into.

Default with `code-quality` and `groovy` plugin:
  ``${project.reportsDir}`/`${project.codeNarcReportsDirName}``

#### `String` `codeNarcReportsDirName`

The name of the directory to write CodeNarc reports into.

Default with `code-quality` and `groovy` plugin:
  `'codenarc'`

#### `String` `appDirName`

The name of the application directory, relative to the project directory. Default is "src/main/application".

Default with `ear` plugin:
  `'src/main/application'`

#### `DeploymentDescriptor` `deploymentDescriptor`

A custom deployment descriptor configuration. Default is an "application.xml" with sensible defaults.

Default with `ear` plugin:
  A deployment descriptor initialized with sensible defaults

#### `String` `libDirName`

The name of the library directory in the EAR file. Default is "lib".

Default with `ear` plugin:
  `'lib'`

#### `String` `apiDocTitle` (read-only)

The title for API documentation for the project.

Default with `java` plugin:
  ``${project.name}` `{project.version}` API`

#### `String` `archivesBaseName`

The base name to use for archive files.

Default with `java` plugin:
  `project.name`

#### `File` `distsDir` (read-only)

The directory to generate TAR and ZIP archives into.

Default with `java` plugin:
  ``${project.buildDir}`/`${project.distsDirName}``

#### `String` `distsDirName`

The name for the distributions directory. This in interpreted relative to the project' build directory.

Default with `java` plugin:
  `'distributions'`

#### `File` `docsDir` (read-only)

Returns a file pointing to the root directory supposed to be used for all docs.

Default with `java` plugin:
  ``${project.buildDir}`/`${project.docsDirName}``

#### `String` `docsDirName`

The name of the docs directory. Can be a name or a path relative to the build dir.

Default with `java` plugin:
  `'docs'`

#### `File` `libsDir` (read-only)

The directory to generate JAR and WAR archives into.

Default with `java` plugin:
  ``${project.buildDir}`/`${project.libsDirName}``

#### `String` `libsDirName`

The name for the libs directory. This in interpreted relative to the project' build directory.

Default with `java` plugin:
  `'libs'`

#### `File` `reportsDir` (read-only)

The directory containing all reports for this project.

Default with `java` plugin:
  ``${project.buildDir}`/`${project.reportsDirName}``

#### `String` `reportsDirName`

The name of the reports directory, relative to the project's build directory.

Default with `java` plugin:
  `'reports'`

#### `JavaVersion` `sourceCompatibility`

The source compatibility used for compiling Java sources.

Default with `java` plugin:
  `JavaVersion.JAVA_1_5`

#### `SourceSetContainer` `sourceSets` (read-only)

The source sets container.

#### `JavaVersion` `targetCompatibility`

The target compatibility used for compiling Java sources.

Default with `java` plugin:
  `project.sourceCompatibility`

#### `File` `testReportDir` (read-only)

Returns a file pointing to the root directory to be used for reports.

Default with `java` plugin:
  ``${project.reportsDir}`/`${project.testReportDirName}``

#### `String` `testReportDirName`

The name of the test reports directory. Can be a name or a path relative to the build dir.

Default with `java` plugin:
  `'tests'`

#### `File` `testResultsDir` (read-only)

Returns a file pointing to the root directory of the test results.

Default with `java` plugin:
  ``${project.buildDir}`/`${project.testResultsDirName}``

#### `String` `testResultsDirName`

The name of the test results directory. Can be a name or a path relative to the build dir.

Default with `java` plugin:
  `'test-results'`

#### `Integer` `httpPort`

The TCP port for Jetty to listen on for incoming HTTP requests.

Default with `jetty` plugin:
  `8080`

#### `String` `stopKey`

The key to use to stop Jetty.

Default with `jetty` plugin:
  `null`

#### `Integer` `stopPort`

The TCP port for Jetty to listen on for stop requests.

Default with `jetty` plugin:
  `null`

#### `Conf2ScopeMappingContainer` `conf2ScopeMappings`

The set of rules for how to map Gradle dependencies to Maven scopes.

#### `File` `pomDir` (read-only)

The directory to generate Maven POMs into.

Default with `maven` plugin:
  ``${project.buildDir}`/`${project.pomDirName}``

#### `String` `pomDirName`

The name of the directory to generate Maven POMs into, relative to the build directory.

Default with `maven` plugin:
  `poms`

#### `File` `projectReportDir` (read-only)

The directory to generate the project reports into.

Default with `project-report` plugin:
  ``${project.reportsDir}`/`${project.projectReportDirName}``

#### `String` `projectReportDirName`

The name of the directory to generate the project reports into, relative to the project's reports dir.

Default with `project-report` plugin:
  `'project'`

#### `SigningSettings` `signing` (read-only)

The `SigningSettings` for the project.

#### `File` `webAppDir` (read-only)

The web application directory.

Default with `war` plugin:
  ``${project.projectDir}`/`${project.webAppDirName}``

#### `String` `webAppDirName`

The name of the web application directory, relative to the project directory.

Default with `war` plugin:
  `'src/main/webapp'`

### Script blocks

Block | Description
`allprojects` | Configures this project and each of its sub-projects.
`ant` | Executes the given closure against the `AntBuilder` for this project. You can use this in your build file to execute ant tasks. The `AntBuild` is passed to the closure as the closure's delegate.
`artifacts` | Configures the published artifacts for this project.
`buildscript` | Configures the build script classpath for this project.
`configurations` | Configures the dependency configurations for this project.
`dependencies` | Configures the dependencies for this project.
`repositories` | Configures the repositories for this project.
`subprojects` | Configures the sub-projects of this project.

#### Script blocks added by the `ear` plugin

Block | Description
`deploymentDescriptor` | Configures the deployment descriptor for this EAR archive.

#### Script blocks added by the `java` plugin

Block | Description
`sourceSets` | Configures the source sets of this project.

#### Script blocks added by the `signing` plugin

Block | Description
`signing` | Configures the signing settings of this project.

### Script block details

#### `allprojects` { }

Configures this project and each of its sub-projects.

This method executes the given closure against this project and its sub-projects. The target `Project` is passed to the closure as the closure's delegate.

Delegates to:
  Each `Project` in `allprojects`

#### `ant` { }

Executes the given closure against the `AntBuilder` for this project. You can use this in your build file to execute ant tasks. The `AntBuild` is passed to the closure as the closure's delegate.

Delegates to:
  `AntBuilder` from `ant`

#### `artifacts` { }

Configures the published artifacts for this project.

This method executes the given closure against the `ArtifactHandler` for this project. The `ArtifactHandler` is passed to the closure as the closure's delegate.

Delegates to:
  `ArtifactHandler` from `artifacts`

#### `buildscript` { }

Configures the build script classpath for this project.

The given closure is executed against this project's `ScriptHandler`. The `ScriptHandler` is passed to the closure as the closure's delegate.

Delegates to:
  `ScriptHandler` from `buildscript`

#### `configurations` { }

Configures the dependency configurations for this project.

This method executes the given closure against the `ConfigurationContainer` for this project. The `ConfigurationContainer` is passed to the closure as the closure's delegate.

Delegates to:
  `ConfigurationContainer` from `configurations`

#### `dependencies` { }

Configures the dependencies for this project.

This method executes the given closure against the `DependencyHandler` for this project. The `DependencyHandler` is passed to the closure as the closure's delegate.

Delegates to:
  `DependencyHandler` from `dependencies`

#### `repositories` { }

Configures the repositories for this project.

This method executes the given closure against the `RepositoryHandler` for this project. The `RepositoryHandler` is passed to the closure as the closure's delegate.

Delegates to:
  `RepositoryHandler` from `repositories`

#### `subprojects` { }

Configures the sub-projects of this project.

This method executes the given closure against each of the sub-projects of this project. The target `Project` is passed to the closure as the closure's delegate.

Delegates to:
  Each `Project` in `subprojects`

#### `deploymentDescriptor` { }

Configures the deployment descriptor for this EAR archive.

The given closure is executed to configure the deployment descriptor. The `DeploymentDescriptor` is passed to the closure as its delegate.

Delegates to:
  `DeploymentDescriptor` from `deploymentDescriptor`

#### `sourceSets` { }

Configures the source sets of this project.

The given closure is executed to configure the `SourceSetContainer`. The `SourceSetContainer` is passed to the closure as its delegate.

See the example below how `SourceSet` 'main' is accessed and how the `SourceDirectorySet` 'java' is configured to exclude some package from compilation.

    apply plugin: 'java'

    sourceSets {
      main {
        java {
          exclude 'some/unwanted/package/**'
        }
      }
    }

Delegates to:
  `SourceSetContainer` from `sourceSets`

#### `signing` { }

Configures the signing settings of this project.

The given closure is use to configure the `SigningSettings`. You can configure what information is used to sign and what will be signed.

    apply plugin: 'java'

    signing {
      sign configurations.archives
    }

Delegates to:
  `SigningSettings` from `signing`

### Methods

Method | Description
`absoluteProjectPath(path)` | Converts a name to an absolute project path, resolving names relative to this project.
`afterEvaluate(closure)` | Adds a closure to be called immediately after this project has been evaluated. The project is passed to the closure as a parameter. Such a listener gets notified when the build file belonging to this project has been executed. A parent project may for example add such a listener to its child project. Such a listener can futher configure those child projects based on the state of the child projects after their build files have been run.
`afterEvaluate(action)` | Adds an action to execute immediately after this project is evaluated.
`allprojects(action)` | Configures this project and each of its sub-projects.
`apply(closure)` | Configures this project using plugins or scripts. The given closure is used to configure an `ObjectConfigurationAction` which is then used to configure this project.
`apply(options)` | Configures this project using plugins or scripts. The following options are available:
`beforeEvaluate(closure)` | Adds a closure to be called immediately before this project is evaluated. The project is passed to the closure as a parameter.
`beforeEvaluate(action)` | Adds an action to execute immediately before this project is evaluated.
`childrenDependOnMe()` | Declares that all child projects of this project have an execution dependency on this project.
`configure(objects, configureClosure)` | Configures a collection of objects via a closure. This is equivalent to calling `Project.configure()` for each of the given objects.
`configure(objects, configureAction)` | Configures a collection of objects via an action.
`configure(object, configureClosure)` | Configures an object via a closure, with the closure's delegate set to the supplied object. This way you don't have to specify the context of a configuration statement multiple times.
`container(type)` | Creates a container for managing named objects of the specified type. The specified type must have a public constructor which takes the name as a String parameter.
`container(type, factoryClosure)` | Creates a container for managing named objects of the specified type. The given closure is used to create object instances. The name of the instance to be created is passed as a parameter to the closure.
`container(type, factory)` | Creates a container for managing named objects of the specified type. The given factory is used to create object instances.
`copy(closure)` | Copies the specified files. The given closure is used to configure a `CopySpec`, which is then used to copy the files. Example:
`copySpec(closure)` | Creates a `CopySpec` which can later be used to copy files or create an archive. The given closure is used to configure the `CopySpec` before it is returned by this method.
`delete(paths)` | Deletes files and directories.
`dependsOn(path)` | Declares that this project has an execution dependency on the project with the given path.
`dependsOn(path, evaluateDependsOnProject)` | Declares that this project has an execution dependency on the project with the given path.
`dependsOnChildren()` | Declares that this project have an execution dependency on each of its child projects.
`dependsOnChildren(evaluateDependsOnProject)` | Declares that this project have an execution dependency on each of its child projects.
`evaluationDependsOn(path)` | Declares that this project has an evaulation dependency on the project with the given path.
`exec(closure)` | Executes an external command. The closure configures a `ExecSpec`.
`file(path)` | Resolves a file path relative to the project directory of this project. This method converts the supplied path based on its type:
`file(path, validation)` | Resolves a file path relative to the project directory of this project and validates it using the given scheme. See `PathValidation` for the list of possible validations.
`fileTree(closure)` | Creates a new `ConfigurableFileTree` using the provided closure. The closure will be used to configure the new file tree. The file tree is passed to the closure as its delegate. Example:
`fileTree(baseDir)` | Creates a new `ConfigurableFileTree` using the given base directory. The given baseDir path is evaluated as for `Project.file()`.
`fileTree(args)` | Creates a new `ConfigurableFileTree` using the provided map of arguments. The map will be applied as properties on the new file tree. Example:
`files(paths, configureClosure)` | Creates a new `ConfigurableFileCollection` using the given paths. The paths are evaluated as for `Project.files()`. The file collection is configured using the given closure. The file collection is passed to the closure as its delegate. Example:
`files(paths)` | Returns a `ConfigurableFileCollection` containing the given files. You can pass any of the following types to this method:
`findProject(path)` | Locates a project by path. If the path is relative, it is interpreted relative to this project.
`getAllTasks(recursive)` | Returns a map of the tasks contained in this project, and optionally its subprojects.
`getTasksByName(name, recursive)` | Returns the set of tasks with the given name contained in this project, and optionally its subprojects.
`hasProperty(propertyName)` | Determines if this project has the given property. See here for details of the properties which are available for a project.
`javaexec(closure)` | Executes a Java main class. The closure configures a `JavaExecSpec`.
`mkdir(path)` | Creates a directory and returns a file pointing to it.
`project(path)` | Locates a project by path. If the path is relative, it is interpreted relative to this project.
`project(path, configureClosure)` | Locates a project by path and configures it using the given closure. If the path is relative, it is interpreted relative to this project. The target project is passed to the closure as the closure's delegate.
`property(propertyName)` | Returns the value of the given property. This method locates a property as follows:
`relativePath(path)` | Returns the relative path from the project directory to the given path. The given path object is (logically) resolved as described for `Project.file()`, from which a relative path is calculated.
`relativeProjectPath(path)` | Converts a name to a project path relative to this project.
`setProperty(name, value)` | Sets a property of this project. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.
`subprojects(action)` | Configures the sub-projects of this project
`tarTree(tarPath)` | Creates a new `FileTree` which contains the contents of the given TAR file. The given tarPath path is evaluated as for `Project.file()`. You can combine this method with the `Project.copy()` method to untar a TAR file.
`task(name)` | Creates a `Task` with the given name and adds it to this project. Calling this method is equivalent to calling `Project.task()` with an empty options map.
`task(name, configureClosure)` | Creates a `Task` with the given name and adds it to this project. Before the task is returned, the given closure is executed to configure the task.
`task(args, name)` | Creates a `Task` with the given name and adds it to this project. A map of creation options can be passed to this method to control how the task is created. The following options are available:
`task(args, name, configureClosure)` | Creates a `Task` with the given name and adds it to this project. Before the task is returned, the given closure is executed to configure the task. A map of creation options can be passed to this method to control how the task is created. See `Project.task()` for the available options.
`uri(path)` | Resolves a file path to a URI, relative to the project directory of this project. Evaluates the provided path object as described for `Project.file()`, with the exception that any URI scheme is supported, not just 'file:' URIs.
`zipTree(zipPath)` | Creates a new `FileTree` which contains the contents of the given ZIP file. The given zipPath path is evaluated as for `Project.file()`. You can combine this method with the `Project.copy()` method to unzip a ZIP file.

#### Methods added by the `announce` plugin

Method | Description
`announce(closure)` | Configures the announce plugin convention. The given closure configures the `AnnouncePluginConvention`.
`announce(msg, type)` | Sends an announcement of the given type.

#### Methods added by the `ear` plugin

Method | Description
`appDirName(appDirName)` | Allows changing the application directory. Default is "src/main/application".
`libDirName(libDirName)` | Allows changing the library directory in the EAR file. Default is "lib".

#### Methods added by the `java` plugin

Method | Description
`manifest()` | Creates a new instance of a `Manifest`.
`manifest(closure)` | Creates and configures a new instance of a `Manifest`. The given closure configures the new manifest instance before it is returned.

#### Methods added by the `maven` plugin

Method | Description
`pom()` | Creates a new `MavenPom`.
`pom(configureClosure)` | Creates and configures a new `MavenPom`. The given closure is executed to configure the new POM instance.

#### Methods added by the `osgi` plugin

Method | Description
`osgiManifest()` | Creates a new instance of `OsgiManifest`. The returned object is preconfigured with:
`osgiManifest(closure)` | Creates and configures a new instance of an `OsgiManifest` . The closure configures the new manifest instance before it is returned.

#### Methods added by the `signing` plugin

Method | Description
`sign(closure)` | Creates a new `SignOperation` using the given closure to configure it before executing it.
`sign(files)` | Digitally signs the files, generating signature files alongside them.
`sign(classifier, files)` | Digitally signs the files, generating signature files alongside them.
`sign(publishArtifacts)` | Digitally signs the publish artifacts, generating signature files alongside them.
`signPom(mavenDeployment, closure)` | Signs the POM artifact for the given maven deployment.

### Method details

#### `String` `absoluteProjectPath`(`String` path)

Converts a name to an absolute project path, resolving names relative to this project.

#### `void` `afterEvaluate`(`Closure` closure)

Adds a closure to be called immediately after this project has been evaluated. The project is passed to the closure as a parameter. Such a listener gets notified when the build file belonging to this project has been executed. A parent project may for example add such a listener to its child project. Such a listener can futher configure those child projects based on the state of the child projects after their build files have been run.

#### `void` `afterEvaluate`(``Action`<? super `Project`>` action)

Adds an action to execute immediately after this project is evaluated.

#### `void` `allprojects`(``Action`<? super `Project`>` action)

Configures this project and each of its sub-projects.

This method executes the given `Action` against this project and each of its sub-projects.

#### `void` `apply`(`Closure` closure)

Configures this project using plugins or scripts. The given closure is used to configure an `ObjectConfigurationAction` which is then used to configure this project.

#### `void` `apply`(``Map`<`String`, ?>` options)

Configures this project using plugins or scripts. The following options are available:

- `from`: A script to apply to the project. Accepts any path supported by `Project.uri()`.
- `plugin`: The id or implementation class of the plugin to apply to the project.
- `to`: The target delegate object or objects. Use this to configure objects other than the project.

For more detail, see `ObjectConfigurationAction`.

#### `void` `beforeEvaluate`(`Closure` closure)

Adds a closure to be called immediately before this project is evaluated. The project is passed to the closure as a parameter.

#### `void` `beforeEvaluate`(``Action`<? super `Project`>` action)

Adds an action to execute immediately before this project is evaluated.

#### `Project` `childrenDependOnMe`()

Declares that all child projects of this project have an execution dependency on this project.

#### ``Iterable`<?>` `configure`(``Iterable`<?>` objects, `Closure` configureClosure)

Configures a collection of objects via a closure. This is equivalent to calling `Project.configure()` for each of the given objects.

#### ``Iterable`<`T`>` `configure`(``Iterable`<`T`>` objects, ``Action`<? super `T`>` configureAction)

Configures a collection of objects via an action.

#### `Object` `configure`(`Object` object, `Closure` configureClosure)

Configures an object via a closure, with the closure's delegate set to the supplied object. This way you don't have to specify the context of a configuration statement multiple times.

Instead of:

    MyType myType = new MyType()
    myType.doThis()
    myType.doThat()

you can do:

    MyType myType = configure(new MyType()) {
        doThis()
        doThat()
    }

The object being configured is also passed to the closure as a parameter, so you can access it explicitly if required:

    configure(someObj) { obj -> obj.doThis() }

#### ``NamedDomainObjectContainer`<`T`>` `container`(``Class`<`T`>` type)

Creates a container for managing named objects of the specified type. The specified type must have a public constructor which takes the name as a String parameter.

All objects MUST expose their name as a bean property named "name". The name must be constant for the life of the object.

#### ``NamedDomainObjectContainer`<`T`>` `container`(``Class`<`T`>` type, `Closure` factoryClosure)

Creates a container for managing named objects of the specified type. The given closure is used to create object instances. The name of the instance to be created is passed as a parameter to the closure.

All objects MUST expose their name as a bean property named "name". The name must be constant for the life of the object.

#### ``NamedDomainObjectContainer`<`T`>` `container`(``Class`<`T`>` type, ``NamedDomainObjectFactory`<`T`>` factory)

Creates a container for managing named objects of the specified type. The given factory is used to create object instances.

All objects MUST expose their name as a bean property named "name". The name must be constant for the life of the object.

#### `WorkResult` `copy`(`Closure` closure)

Copies the specified files. The given closure is used to configure a `CopySpec`, which is then used to copy the files. Example:

    copy {
       from configurations.runtime
       into 'build/deploy/lib'
    }

Note that CopySpecs can be nested:

    copy {
       into 'build/webroot'
       exclude '**/.svn/**'
       from('src/main/webapp') {
          include '**/*.jsp'
          filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
       }
       from('src/main/js') {
          include '**/*.js'
       }
    }

#### `CopySpec` `copySpec`(`Closure` closure)

Creates a `CopySpec` which can later be used to copy files or create an archive. The given closure is used to configure the `CopySpec` before it is returned by this method.

#### `boolean` `delete`(``Object`...` paths)

Deletes files and directories.

#### `void` `dependsOn`(`String` path)

Declares that this project has an execution dependency on the project with the given path.

#### `void` `dependsOn`(`String` path, `boolean` evaluateDependsOnProject)

Declares that this project has an execution dependency on the project with the given path.

#### `Project` `dependsOnChildren`()

Declares that this project have an execution dependency on each of its child projects.

#### `Project` `dependsOnChildren`(`boolean` evaluateDependsOnProject)

Declares that this project have an execution dependency on each of its child projects.

#### `Project` `evaluationDependsOn`(`String` path)

Declares that this project has an evaulation dependency on the project with the given path.

#### `ExecResult` `exec`(`Closure` closure)

Executes an external command. The closure configures a `ExecSpec`.

#### `File` `file`(`Object` path)

Resolves a file path relative to the project directory of this project. This method converts the supplied path based on its type:

- `File`. If the file is an absolute file, it is returned as is. Otherwise, the file's path is interpreted relative to the project directory.
- `URI` or `URL`. The URL's path is interpreted as the file path. Currently, only `file:` URLs are supported.
- `Closure`. The closure's return value is resolved recursively.
- `Callable`. The callable's return value is resolved recursively.
- `Object`. The object's `toString()` value is interpreted as a path. If the path is a relative path, the project directory will be used as a base directory. A String starting with `file:` is treated as a file URL.

#### `File` `file`(`Object` path, `PathValidation` validation)

Resolves a file path relative to the project directory of this project and validates it using the given scheme. See `PathValidation` for the list of possible validations.

#### `ConfigurableFileTree` `fileTree`(`Closure` closure)

Creates a new `ConfigurableFileTree` using the provided closure. The closure will be used to configure the new file tree. The file tree is passed to the closure as its delegate. Example:

    fileTree {
       from 'src'
       exclude '**/.svn/**'
    }.copy { into 'dest'}

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

#### `ConfigurableFileTree` `fileTree`(`Object` baseDir)

Creates a new `ConfigurableFileTree` using the given base directory. The given baseDir path is evaluated as for `Project.file()`.

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

#### `ConfigurableFileTree` `fileTree`(``Map`<`String`, ?>` args)

Creates a new `ConfigurableFileTree` using the provided map of arguments. The map will be applied as properties on the new file tree. Example:

    fileTree(dir:'src', excludes:['**/ignore/**','**/.svn/**'])

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

#### `ConfigurableFileCollection` `files`(`Object` paths, `Closure` configureClosure)

Creates a new `ConfigurableFileCollection` using the given paths. The paths are evaluated as for `Project.files()`. The file collection is configured using the given closure. The file collection is passed to the closure as its delegate. Example:

    files "$buildDir/classes" {
        builtBy 'compile'
    }

The returned file collection is lazy, so that the paths are evaluated only when the contents of the file collection are queried. The file collection is also live, so that it evaluates the above each time the contents of the collection is queried.

#### `ConfigurableFileCollection` `files`(``Object`...` paths)

Returns a `ConfigurableFileCollection` containing the given files. You can pass any of the following types to this method:

- A `String`. Interpreted relative to the project directory, as for `Project.file()`. A string that starts with `file:` is treated as a file URL.
- A `File`. Interpreted relative to the project directory, as for `Project.file()`.
- `URI` or `URL`. The URL's path is interpreted as a file path. Currently, only `file:` URLs are supported.
- A `Collection`, `Iterable`, or an array. May contain any of the types listed here. The elements of the collection are recursively converted to files.
- A `FileCollection`. The contents of the collection are included in the returned collection.
- A `Callable`. The `call()` method may return any of the types listed here. The return value of the `call()` method is recursively converted to files. A `null` return value is treated as an empty collection.
- A Closure. May return any of the types listed here. The return value of the closure is recursively converted to files. A `null` return value is treated as an empty collection.
- An Object. Its `toString()` value is treated the same way as a String, as for `Project.file()`.

The returned file collection is lazy, so that the paths are evaluated only when the contents of the file collection are queried. The file collection is also live, so that it evaluates the above each time the contents of the collection is queried.

The returned file collection maintains the iteration order of the supplied paths.

#### `Project` `findProject`(`String` path)

Locates a project by path. If the path is relative, it is interpreted relative to this project.

#### ``Map`<`Project`, `Set`<`Task`>>` `getAllTasks`(`boolean` recursive)

Returns a map of the tasks contained in this project, and optionally its subprojects.

#### ``Set`<`Task`>` `getTasksByName`(`String` name, `boolean` recursive)

Returns the set of tasks with the given name contained in this project, and optionally its subprojects.

#### `boolean` `hasProperty`(`String` propertyName)

Determines if this project has the given property. See here for details of the properties which are available for a project.

#### `ExecResult` `javaexec`(`Closure` closure)

Executes a Java main class. The closure configures a `JavaExecSpec`.

#### `File` `mkdir`(`Object` path)

Creates a directory and returns a file pointing to it.

#### `Project` `project`(`String` path)

Locates a project by path. If the path is relative, it is interpreted relative to this project.

#### `Project` `project`(`String` path, `Closure` configureClosure)

Locates a project by path and configures it using the given closure. If the path is relative, it is interpreted relative to this project. The target project is passed to the closure as the closure's delegate.

#### `Object` `property`(`String` propertyName)

Returns the value of the given property. This method locates a property as follows:

1. If this project object has a property with the given name, return the value of the property.
2. If this project's convention object has a property with the given name, return the value of the property.
3. If this project has an additional property with the given name, return the value of the property.
4. If this project has a task with the given name, return the task.
5. Search up through this project's ancestor projects for a convention property or additional property with the given name.
6. If not found, throw `MissingPropertyException`

#### `String` `relativePath`(`Object` path)

Returns the relative path from the project directory to the given path. The given path object is (logically) resolved as described for `Project.file()`, from which a relative path is calculated.

#### `String` `relativeProjectPath`(`String` path)

Converts a name to a project path relative to this project.

#### `void` `setProperty`(`String` name, `Object` value)

Sets a property of this project. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.

1. The project object itself. For example, the `rootDir` project property.
2. The project's `Convention` object. For example, the `srcRootName` java plugin property.
3. The project's additional properties.

If the property is not found in any of these locations, it is added to the project's additional properties.

#### `void` `subprojects`(``Action`<? super `Project`>` action)

Configures the sub-projects of this project

This method executes the given `Action` against the sub-projects of this project.

#### `FileTree` `tarTree`(`Object` tarPath)

Creates a new `FileTree` which contains the contents of the given TAR file. The given tarPath path is evaluated as for `Project.file()`. You can combine this method with the `Project.copy()` method to untar a TAR file.

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

#### `Task` `task`(`String` name)

Creates a `Task` with the given name and adds it to this project. Calling this method is equivalent to calling `Project.task()` with an empty options map.

After the task is added to the project, it is made available as a property of the project, so that you can reference the task by name in your build file. See here for more details

If a task with the given name already exists in this project, an exception is thrown.

#### `Task` `task`(`String` name, `Closure` configureClosure)

Creates a `Task` with the given name and adds it to this project. Before the task is returned, the given closure is executed to configure the task.

After the task is added to the project, it is made available as a property of the project, so that you can reference the task by name in your build file. See here for more details

#### `Task` `task`(``Map`<`String`, ?>` args, `String` name)

Creates a `Task` with the given name and adds it to this project. A map of creation options can be passed to this method to control how the task is created. The following options are available:

Option | Description | Default Value
``type`` | The class of the task to create. | `DefaultTask`
``overwrite`` | Replace an existing task? | `false`
``dependsOn`` | A task name or set of task names which this task depends on | `[]`
``action`` | A closure or `Action` to add to the task. | `null`
``description`` | A description of the task. | `null`
``group`` | A task group which this task belongs to. | `null`

After the task is added to the project, it is made available as a property of the project, so that you can reference the task by name in your build file. See here for more details

If a task with the given name already exists in this project and the `override` option is not set to true, an exception is thrown.

#### `Task` `task`(``Map`<`String`, ?>` args, `String` name, `Closure` configureClosure)

Creates a `Task` with the given name and adds it to this project. Before the task is returned, the given closure is executed to configure the task. A map of creation options can be passed to this method to control how the task is created. See `Project.task()` for the available options.

After the task is added to the project, it is made available as a property of the project, so that you can reference the task by name in your build file. See here for more details

If a task with the given name already exists in this project and the `override` option is not set to true, an exception is thrown.

#### `URI` `uri`(`Object` path)

Resolves a file path to a URI, relative to the project directory of this project. Evaluates the provided path object as described for `Project.file()`, with the exception that any URI scheme is supported, not just 'file:' URIs.

#### `FileTree` `zipTree`(`Object` zipPath)

Creates a new `FileTree` which contains the contents of the given ZIP file. The given zipPath path is evaluated as for `Project.file()`. You can combine this method with the `Project.copy()` method to unzip a ZIP file.

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

#### `void` `announce`(`Closure` closure)

Configures the announce plugin convention. The given closure configures the `AnnouncePluginConvention`.

#### `void` `announce`(`String` msg, `String` type)

Sends an announcement of the given type.

#### `void` `appDirName`(`String` appDirName)

Allows changing the application directory. Default is "src/main/application".

#### `void` `libDirName`(`String` libDirName)

Allows changing the library directory in the EAR file. Default is "lib".

#### `Manifest` `manifest`()

Creates a new instance of a `Manifest`.

#### `Manifest` `manifest`(`Closure` closure)

Creates and configures a new instance of a `Manifest`. The given closure configures the new manifest instance before it is returned.

#### `MavenPom` `pom`()

Creates a new `MavenPom`.

#### `MavenPom` `pom`(`Closure` configureClosure)

Creates and configures a new `MavenPom`. The given closure is executed to configure the new POM instance.

#### `OsgiManifest` `osgiManifest`()

Creates a new instance of `OsgiManifest`. The returned object is preconfigured with:

    version: project.version
    name: project.archivesBaseName
    symbolicName: project.group + "." + project.archivesBaseName (see below for exceptions to this rule)

The symbolic name is usually the group + "." + archivesBaseName, with the following exceptions

- if group has only one section (no dots) and archivesBaseName is not null then the first package name with classes is returned. eg. commons-logging:commons-logging -> org.apache.commons.logging
- if archivesBaseName is equal to last section of group then group is returned. eg. org.gradle:gradle -> org.gradle
- if archivesBaseName starts with last section of group that portion is removed. eg. org.gradle:gradle-core -> org.gradle.core

#### `OsgiManifest` `osgiManifest`(`Closure` closure)

Creates and configures a new instance of an `OsgiManifest` . The closure configures the new manifest instance before it is returned.

#### `SignOperation` `sign`(`Closure` closure)

Creates a new `SignOperation` using the given closure to configure it before executing it.

The project's default signatory and default signature type from the `SigningSettings` will be used to generate the signature. The returned `SignOperation` gives access to the created signature files.

If there is no configured default signatory available (and one is not explicitly specified in this operation's configuration), the sign operation will fail.

#### `SignOperation` `sign`(``File`...` files)

Digitally signs the files, generating signature files alongside them.

The project's default signatory and default signature type from the `SigningSettings` will be used to generate the signature. The returned `SignOperation` gives access to the created signature files.

If there is no configured default signatory available, the sign operation will fail.

#### `SignOperation` `sign`(`String` classifier, ``File`...` files)

Digitally signs the files, generating signature files alongside them.

The project's default signatory and default signature type from the `SigningSettings` will be used to generate the signature. The returned `SignOperation` gives access to the created signature files.

If there is no configured default signatory available, the sign operation will fail.

#### `SignOperation` `sign`(``PublishArtifact`...` publishArtifacts)

Digitally signs the publish artifacts, generating signature files alongside them.

The project's default signatory and default signature type from the `SigningSettings` will be used to generate the signature. The returned `SignOperation` gives access to the created signature files.

If there is no configured default signatory available, the sign operation will fail.

#### `Signature` `signPom`(`MavenDeployment` mavenDeployment, `Closure` closure)

Signs the POM artifact for the given maven deployment.

You can use this method to sign the generated pom when publishing to a maven repository with the maven plugin.

    uploadArchives {
      repositories {
        mavenDeployer {
          beforeDeployment { MavenDeployment deployment ->
            signPom(deployment)
          }
        }
      }
    }

You can optionally provide a configuration closure to fine tune the `SignOperation` for the POM.