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

39

The Project Report Plugin

The Project report plugin is currently a work in progress, and at this stage doesn't do particularly much. We plan to add much more to these reports in future releases of Gradle.

The Project report plugin adds some tasks to your project which generate reports containing useful information about your build. Those tasks generate exactly the same content as the command line reports triggered by gradle tasks, gradle dependencies and gradle properties (see Section 11.5, “Obtaining information about your build”). In contrast to the command line reports, the report plugin generates the reports into a file. There is also an aggregating task that depends on all report tasks added by the plugin.

39.1. Usage

To use the Project report plugin, include in your build script:

apply plugin: 'project-report'

39.2. Tasks

The project report plugin defines the following tasks:

Page 205 of 343

Table 39.1. Project report plugin - tasks

 

 

Task name

Depends on

Type

Description

dependencyReport

-

DependencyReportTask

Generates

 

 

 

the project

 

 

 

dependency

 

 

 

report.

propertyReport

-

PropertyReportTask

Generates

 

 

 

the project

 

 

 

property

 

 

 

report.

taskReport

-

TaskReportTask

Generates

 

 

 

the project

 

 

 

task report.

projectReport

dependencyReport, proTaskpertyReport

Generates

 

, taskReport

 

all project

 

 

 

reports.

39.3. Project layout

The project report plugin does not require any particular project layout.

39.4. Dependency management

The project report plugin does not define any dependency configurations.

39.5. Convention properties

The project report defines the following convention properties:

Page 206 of 343

Table 39.2. Project report plugin - convention properties

Property name

Type

Default value

reportsDirName

String

reports

reportsDir

File

buildDir/reportsDirName

 

(read-only)

 

projects

Set<Project>

A one element set with the project

projectReportDirName String

project

projectReportDir

File

reportsDir/projectReportDirName

 

(read-only)

 

These convention properties are provided by a convention object of type

ProjectReportsPluginConvention.

Page 207 of 343

40

The Announce Plugin

The Gradle announce plugin enables you to publish messages on succeeded tasks to your favourite platforms. It supports

Twitter

Ubuntu Notify

Snarl, a Windows Notification System

Growl, a Mac OS X Notification System

40.1. Usage

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

Example 40.1. Using the announce plugin

build.gradle

apply plugin: 'announce'

After that, configure you username and password (if required for the service you want to announce to) with:

Example 40.2. Configure the announce plugin

build.gradle

announce {

username = 'myId' password = 'myPassword'

}

Finally, you can use announce with any task by attaching it via task.dolast() as shown below

Page 208 of 343

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