Gradle Glam: jacoco + coveralls; take 2 - No Fluff Just Stuff

Gradle Glam: jacoco + coveralls; take 2

Posted by: Andres Almiray on August 5, 2014

This is a quick one. A few days ago I posted how you can configure JaCoCo and Coveralls to work in tandem. However there's a problem with the setup shown in that post, basically coveralls will fail to find the aggregated report file because it's place in a non-standard location #sadpanda

But there's a way to fix it. First we must instruct the jacocoRootReport task to generate an XML report at the expected location. Secondly we must tell coveralls where it can find all the source files, because it will attempt to load source files from the root project (which is empty). The fixed build file is here

I supposed we could also configure the report location in the coveralls configuration as there is a property named jacocoReportPath as appreciated at https://github.com/kt3k/coveralls-gradle-plugin/blob/master/src/main/groovy/org/kt3k/gradle/plugin/CoverallsPluginExtension.groovy.

Keep on Groovying!

Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »