Run Jacoco Reports with Play application

Hi,
Is it possible to run Jacoco report in an application combining the Play and Jacoco plugins ?
If not, what is the best way to get Jacoco reports on Play application with gradle?
Thanks in advance,
Ignace

I was able to make it run

plugins {
id ‘play’
}
apply plugin: "jacoco"
apply plugin: “org.sonarqube”

tasks.withType(Test) { task ->
jacoco{
append = false
}
}
sonarqube {
properties {
property “sonar.host.url”, "${sonar_host_url}"
property “sonar.jdbc.url”, "${sonar_jdbc_url}"
property “sonar.jdbc.username”, "${sonar_user}"
property “sonar.jdbc.password”, "${sonar_password}"
property “sonar.sources”, [“app”,“public/js”]
property “sonar.tests”, "test"
property “sonar.junit.reportsPath”, "build/playBinary/reports/test/xml"
property “sonar.jacoco.reportPath”, "build/jacoco/testPlayBinary.exec"
property “sonar.java.binaries”, "build/playBinary/classes"
property “sonar.java.test.binaries”, “build/playBinary/testClasses”
}
}

1 Like