|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.gradle.api.plugins.sonar.model.SonarRootModel
class SonarRootModel
Configuration options for a project that has the sonar plugin applied.
Property Summary | |
---|---|
File |
bootstrapDir
Directory where the Sonar client library will be stored. |
String |
branch
Name of the version control branch that is analyzed. |
List |
childModels
Configuration options for child projects of this project. |
SonarDatabase |
database
Configuration options related to the Sonar database. |
String |
gradleVersion
The Gradle version to be reported to the Sonar client library. |
String |
profile
Selects one of the quality profiles configured via the Sonar web interface, overriding any selection made there. |
SonarProject |
project
Per-project configuration options. |
List |
propertyProcessors
Post-processors for global Sonar properties. |
SonarServer |
server
Configuration options related to the Sonar server. |
Method Summary | |
---|---|
void
|
database(Closure config)
Configures database configuration options. |
void
|
project(Closure config)
Configures per-project configuration options. |
void
|
server(Closure config)
Configures server configuration options. |
void
|
withGlobalProperties(Closure block)
Registers a closure for post-processing the global Sonar properties covered by SonarRootModel, 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 bootstrapDir
@SonarProperty("sonar.branch") String branch
List childModels
@IncludeProperties SonarDatabase database
String gradleVersion
@SonarProperty("sonar.profile") String profile
SonarProject project
List propertyProcessors
@IncludeProperties SonarServer server
Method Detail |
---|
void database(Closure config)
database
- configuration options
void project(Closure config)
per-project
- configuration options
void server(Closure config)
server
- configuration options
void withGlobalProperties(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:
withGlobalProperties { props -> // add further properties props["some.sonar.property"] = "some value" props["another.sonar.property"] = "another value" // modify existing properties (rarely necessary) props["sonar.branch"] = "some-branch" props.remove("sonar.profile") }
block
- a closure for post-processing global Sonar properties
Gradle API 1.12