# Chapter 32. The JDepend Plugin

The JDepend plugin performs quality checks on your project's source files using JDepend and generates reports from these checks.

## 32.1. Usage

To use the JDepend plugin, include in your build script:

Example 32.1. Using the JDepend plugin

`build.gradle`

    apply plugin: 'jdepend'

The plugin adds a number of tasks to the project that perform the quality checks. You can execute the checks by running `gradle check`.

## 32.2. Tasks

The JDepend plugin adds the following tasks to the project:

Table 32.1. JDepend plugin - tasks

Task name | Depends on | Type | Description
`jdependMain` | `classes` | `JDepend` | Runs JDepend against the production Java source files.
`jdependTest` | `testClasses` | `JDepend` | Runs JDepend against the test Java source files.
`jdepend`SourceSet`` | ``sourceSet`Classes` | `JDepend` | Runs JDepend against the given source set's Java source files.

The JDepend plugin adds the following dependencies to tasks defined by the Java plugin.

Table 32.2. JDepend plugin - additional task dependencies

Task name | Depends on
`check` | All JDepend tasks, including `jdependMain` and `jdependTest`.

## 32.3. Dependency management

The JDepend plugin adds the following dependency configurations:

Table 32.3. JDepend plugin - dependency configurations

Name | Meaning
`jdepend` | The JDepend libraries to use

## 32.4. Configuration

See `JDependExtension`.