@Deprecated class SonarRootModel extends Object
Configuration options for a project that has the sonar plugin applied.
| Type | Name and description |
|---|---|
File |
bootstrapDirDirectory where the Sonar client library will be stored. |
String |
branchName of the version control branch that is analyzed. |
List<SonarModel> |
childModelsConfiguration options for child projects of this project. |
SonarDatabase |
databaseConfiguration options related to the Sonar database. |
String |
gradleVersionThe Gradle version to be reported to the Sonar client library. |
String |
profileSelects one of the quality profiles configured via the Sonar web interface, overriding any selection made there. |
SonarProject |
projectPer-project configuration options. |
List<groovy.lang.Closure> |
propertyProcessorsPost-processors for global Sonar properties. |
SonarServer |
serverConfiguration options related to the Sonar server. |
| Type | Name and description |
|---|---|
void |
database(groovy.lang.Closure config)Configures database configuration options. |
void |
project(groovy.lang.Closure config)Configures per-project configuration options. |
void |
server(groovy.lang.Closure config)Configures server configuration options. |
void |
withGlobalProperties(groovy.lang.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. |
Directory where the Sonar client library will be stored. The correct version of the client library is automatically downloaded from the Sonar server before analysis begins. Defaults to $project.buildDir/sonar.
Name of the version control branch that is analyzed. Two branches of the same project are considered as different projects in Sonar. Defaults to null.
Configuration options for child projects of this project.
Configuration options related to the Sonar database.
The Gradle version to be reported to the Sonar client library. Only used for identification purposes. Defaults to the current Gradle version.
Selects one of the quality profiles configured via the Sonar web interface, overriding any selection made there. Defaults to null.
Per-project configuration options.
Post-processors for global Sonar properties.
Configuration options related to the Sonar server.
Configures database configuration options. The specified closure delegates to an instance of SonarDatabase.
database - configuration optionsConfigures per-project configuration options. The specified closure delegates to an instance of SonarProject.
per-project - configuration optionsConfigures server configuration options. The specified closure delegates to an instance of SonarServer.
server - configuration optionsRegisters a closure for post-processing the global Sonar properties covered by SonarRootModel, and for adding further properties not covered by that model. The properties are passed to the closure as a map of String keys and values. Keys correspond to the Sonar properties as described in the Sonar documentation.
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