I'm using Gradle 2.14. I'd like to read the report-task.txt generated by the SonarQube Gradle plugin. For this purpose I need to get the location of this file which is stored in
sonarqube {
properties {
sonar.working.directory "..."
}
}
I want to access this property from outside the sonarqube plugin, i.e. I'm writing a gradle task that runs after the sonar task. This tasks needs to process the report-task.txt located in sonar.working.directory.
Is is possible to access the properties of a gradle plugin?
The task sonarqube
exposes all of the defined properties:
plugins {
id "org.sonarqube" version "2.0.1"
}
sonarqube {
properties {
property "sonar.working.directory", "..."
}
}
task printSonarqubeProperty {
doLast {
println "${project.tasks['sonarqube'].properties['sonar.working.directory']}"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With