|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.gradle.api.plugins.sonar.model.SonarProject
class SonarProject extends Object
Per-project configuration options.
Property Summary | |
---|---|
File |
baseDir
The base directory for the analysis. |
List |
binaryDirs
The directories containing the project's compiled code to be analyzed. |
File |
cloverReportPath
The Clover XML report file. |
File |
coberturaReportPath
The Cobertura XML report file. |
String |
date
The date when analysis was performed. |
String |
description
A description for the project. |
String |
dynamicAnalysis
Whether and how to perform dynamic analysis. |
boolean |
importSources
Tells whether to the project's source code should be stored and made available via the Sonar web interface. |
SonarJavaSettings |
java
Java-related configuration options. |
String |
key
The identifier for the project. |
String |
language
The programming language to be analyzed. |
FileCollection |
libraries
A class path containing the libraries used by this project. |
String |
name
The name for the project. |
List |
propertyProcessors
Post-processors for per-project Sonar properties. |
boolean |
skip
Tells whether to skip analysis of this project. |
boolean |
skipDesignAnalysis
Tells whether to skip analysis of the project's design. |
List |
sourceDirs
The directories containing the project's production source code to be analyzed. |
String |
sourceEncoding
The character encoding for the project's source files. |
String |
sourceExclusions
Source files to be excluded from analysis. |
List |
testDirs
The directories containing the project's test source code to be analyzed. |
File |
testReportPath
The directory containing the JUnit XML test report. |
String |
version
The version of the project. |
File |
workDir
The working directory for the analysis. |
Method Summary | |
---|---|
void
|
java(Closure config)
Configures Java-related configuration options. |
void
|
withProjectProperties(Closure block)
Registers a closure for post-processing the per-project Sonar properties covered by SonarProjectModel, and for adding further properties not covered by that model. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
File baseDir
List binaryDirs
@SonarProperty("sonar.clover.reportPath") File cloverReportPath
@SonarProperty("sonar.cobertura.reportPath") File coberturaReportPath
@SonarProperty("sonar.projectDate") String date
String description
@SonarProperty("sonar.dynamicAnalysis") String dynamicAnalysis
@SonarProperty("sonar.importSources") boolean importSources
@IncludeProperties SonarJavaSettings java
String key
@SonarProperty("sonar.language") String language
FileCollection libraries
String name
List propertyProcessors
boolean skip
@SonarProperty("sonar.skipDesign") boolean skipDesignAnalysis
List sourceDirs
@SonarProperty("sonar.sourceEncoding") String sourceEncoding
@SonarProperty("sonar.exclusions") String sourceExclusions
Example: com/mycompany/*/.java, **/*Dummy.java.
Defaults to null.
List testDirs
@SonarProperty("sonar.surefire.reportsPath") File testReportPath
String version
File workDir
Method Detail |
---|
void java(Closure config)
config
- Java-related configuration options
void withProjectProperties(Closure block)
Evaluation of the closure is deferred until build execution time. If this method is called multiple times, closures will be evaluated in the order they have been registered.
Example:
withProjectProperties { props -> // add further properties props["some.sonar.property"] = "some value" props["another.sonar.property"] = "another value" // modify existing properties (rarely necessary) props["sonar.sourceEncoding"] = "UTF-8" props.remove("sonar.projectDate") }
block
- a closure for post-processing per-project Sonar properties
Gradle API 1.0-milestone-8