Not sure how easy it would be to make a generic plugin. I don't have any experience with Cobertura, but it requires instrumentation before running the tests, right? JaCoCo uses an agent to instrument on-the-fly. The configuration ends up being pretty different since you need a task to instrument for Cobertura, but each task running the JaCoCo agent might have its own.
Andy On Thu, Oct 31, 2013 at 9:31 AM, johnrengelman <john.r.engel...@gmail.com>wrote: > We use the Cobertura plugin for our builds, but we've been using this > version: https://github.com/stevesaliman/gradle-cobertura-plugin > > -- > John Engelman > > On Thursday, October 31, 2013 at 6:25 AM, Mark Koops [via Gradle] wrote: > > Hi, > > In our team we are migrating from Ant to Gradle and in our Ant build we > determine code coverage using a custom build of Cobertura. > > I have given Jacoco a change as being available as build-in plugin, but > the differences are too big. > For now Jacoco does not provide enough options to filter out branched > related to assertions and specific "unreachable" branches in our code. > > So I would like to setup Cobertura code coverage detection in our Gradle > build. > Some time ago, I have been experimenting with > https://github.com/eriwen/gradle-cobertura-plugin, but not to full > success at that time. I will check again. > > But I would to work on a build-in Cobertura plugin side-by-side with > Jacoco. Then you have a choice which one to use. > > How about: generalizing the Jacoco plugin code to a generic java code > coverage plugin base class with two derived implementations, one for Jacoco > and one for Cobertura. > > Thanks, > > --Mark > > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://gradle.1045684.n5.nabble.com/How-about-Cobertura-along-Jacoco-as-build-in-code-coverage-plugin-tp5711967.html > To start a new topic under gradle-dev, email [hidden > email]<http://user/SendEmail.jtp?type=node&node=5711968&i=0> > To unsubscribe from gradle-dev, click here. > NAML<http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > > > ------------------------------ > View this message in context: Re: How about Cobertura along Jacoco as > build-in code coverage > plugin?<http://gradle.1045684.n5.nabble.com/How-about-Cobertura-along-Jacoco-as-build-in-code-coverage-plugin-tp5711967p5711968.html> > Sent from the gradle-dev mailing list > archive<http://gradle.1045684.n5.nabble.com/gradle-dev-f1436218.html>at > Nabble.com. >