Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Gradle.pdf
Скачиваний:
9
Добавлен:
24.03.2015
Размер:
1.4 Mб
Скачать

Table 29.2. Checkstyle plugin - additional task dependencies

Task name

Depends on

check

All Checkstyle tasks, including checkstyleMain and checkstyleTest.

29.3. Project layout

The Checkstyle plugin expects the following project layout:

Table 29.3. Checkstyle plugin - project layout

File

Meaning

config/checkstyle/checkstyle.xml

Checkstyle configuration file

29.4. Dependency management

The Checkstyle plugin adds the following dependency configurations:

Table 29.4. Checkstyle plugin - dependency configurations

Name Meaning

checkstyle The Checkstyle libraries to use

29.5. Configuration

See CheckstyleExtension.

Page 176 of 343

30

The CodeNarc Plugin

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

30.1. Usage

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

Example 30.1. Using the CodeNarc plugin

build.gradle

apply plugin: 'codenarc'

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

30.2. Tasks

The CodeNarc plugin adds the following tasks to the project:

Table 30.1. CodeNarc plugin - tasks

Task name

Depends

Type

Description

 

on

 

 

codenarcMain

-

CodeNarc

Runs CodeNarc against the production Groovy

 

 

 

source files.

codenarcTest

-

CodeNarc

Runs CodeNarc against the test Groovy

 

 

 

source files.

codenarcSourceSet-

CodeNarc

Runs CodeNarc against the given source set's

 

 

 

Groovy source files.

The CodeNarc plugin adds the following dependencies to tasks defined by the Groovy plugin.

Page 177 of 343

Table 30.2. CodeNarc plugin - additional task dependencies

Task name

Depends on

check

All CodeNarc tasks, including codenarcMain and codenarcTest.

30.3. Project layout

The CodeNarc plugin expects the following project layout:

Table 30.3. CodeNarc plugin - project layout

File

Meaning

config/codenarc/codenarc.xml

CodeNarc configuration file

30.4. Dependency management

The CodeNarc plugin adds the following dependency configurations:

Table 30.4. CodeNarc plugin - dependency configurations

Name Meaning

codenarc The CodeNarc libraries to use

30.5. Configuration

See CodeNarcExtension.

Page 178 of 343

31

The FindBugs Plugin

The FindBugs plugin performs quality checks on your project's Java source files usingFindBugs and generates reports from these checks.

31.1. Usage

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

Example 31.1. Using the FindBugs plugin

build.gradle

apply plugin: 'findbugs'

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

31.2. Tasks

The FindBugs plugin adds the following tasks to the project:

Table 31.1. FindBugs plugin - tasks

Task name

Depends on

Type

Description

findbugsMain

classes

FindBugs

Runs FindBugs against the production

 

 

 

Java source files.

findbugsTest

testClasses

FindBugs

Runs FindBugs against the test Java

 

 

 

source files.

findbugsSourceSetsourceSetClassFindBugses

Runs FindBugs against the given source

 

 

 

set's Java source files.

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

Page 179 of 343

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]