title: Android Gradle Code Coverage
body: <p>I have a simple android project with test cases.</p>
  
  <pre><code>ProjNameProject
  --build.gradle
  --ProjName
  ----build.gradle
  </code></pre>
  
  <p>I see that by default android's new build system provides basic test results by default. (Hooray!)</p>
  
  <p>Now I want to see code coverage as well. I know how to set this up using Emma and Ant scripts, however I don't want to run Ant scripts here. I feel that would defeat the purpose of me using the new build system.</p>
  
  <p>I've tried a few Cobertura plugins that were found on Github. One in particular:
  <a href="https://github.com/stevesaliman/gradle-cobertura-plugin">https://github.com/stevesaliman/gradle-cobertura-plugin</a></p>
  
  <p>However if I try to use the plugin in the <code>ProjName</code> build file then I get errors about the <code>java</code> plugin. I read on tools.android.com that adding the <code>java</code> plugin will generate this behavior. I'm not applying it so the cobertura plugin must be.<br/>If I try to use the plugin in the main build file then I don't see the java errors but now i see:</p>
  
  <pre><code>Could not find net.sourceforge.cobertura:cobertura:1.9.4.1.
      Required by:
          :ProjNameProject:unspecified
  </code></pre>
  
  <p>What do I do??</p>