Hello,
I'm trying to figure out how to make sonarqube have a dependency on Jacoco jacocoTestReport so the following would execute both sonar and jacoco:
gradle clean test sonarqube
I've tried a few combinations but since sonarqube is applied to the root project and jacocoTestReport seems the dependency has a hard time finding the tasks or enters a loop depending on where I place the dependency. I would love to know if anyone has solved this.
----
Here's an example in shorthand of what I am after:
in root build.gradle I just have something like:
apply plugin 'org.sonarqube'
project.tasks["sonarqube"].dependsOn jacocoTestReport
which returns
* What went wrong:
A problem occurred evaluating root project 'my-project'.
> Could not find property 'jacocoTestReport' on root project 'my-project`.
If I try to say refer to the subtasks from subprojects it doesn't come up seems the array is empty for built in tasks.
project.tasks["sonarqube"].dependsOn subprojects.tasks["jacocoTestReport"]
Could not find property 'jacocoTestReport' on task set