I have a traditional java project using gradle build system.
I would like to add jacoco code coverage report generation. So I applied jacoco plugin and everything works as expected when I call gradle build jacocoTestReport
I was wondering how can I define in my build.gradle
script that jacocoTestReport
task should run automatically after build
task has been finished.
The goal is to only run gradle build
from command line and this will automatically execute test
and jacocoTestReport
(so that I don't have to pass jacocoTestReport
as commandline parameter explicitly).