title: Combine jacoco coverage from androidTest and test
body: <p>Since the release of <code>'com.android.tools.build:gradle:1.1.0'</code> I'm moving most of my java test code from <code>androidTest</code> to the <code>test</code> folder because the JVM tests are a lot faster. But I cannot move all tests. I really need the device tests because of some <code>ContentProvider</code> stuff.</p>
  
  <p>I've had 100% code coverage before I started migrating. When I'm currently running the jacoco code coverage I get 40% for the <code>androidTest</code> folder and 71% for the <code>test</code> folder. My code is 100% tested but I have no report proofing this.</p>
  
  <p><strong>Is there a way to combine both reports?</strong> I found <a href="https://gradle.org/docs/current/dsl/org.gradle.testing.jacoco.tasks.JacocoMerge.html">JacocoMerge</a> but couldn't get it to work.</p>
  
  <p>Here is the output of the <code>androidTest</code> folder: <code>build/outputs/reports/coverage/debug/index.html</code></p>
  
  <p>And here the output of the <code>test</code> folder
  <code>build/reports/jacoco/generateJacocoTestReports/html/index.html</code>
  generated with this gradle task:</p>
  
  <pre><code>def coverageSourceDirs = [
          '../library/src/main/java'
  ]
  
  task generateJacocoTestReports(type: JacocoReport, dependsOn: "test") {
      group = "Reporting"
      description = 'Generate Jacoco Robolectric unit test coverage reports'
  
      classDirectories = fileTree(
              dir: '../library/build/intermediates/classes/debug',
              excludes: ['**//*R.class',
                         '**//*R$*.class',
                         '***/*//*$ViewInjector*.*',
                         '**//*BuildConfig.*',
                         '**//*Manifest*.*']
              )
      sourceDirectories = files(coverageSourceDirs)
      additionalSourceDirs = files(coverageSourceDirs)
      executionData = files('../library/build/jacoco/testDebug.exec')
  }
  </code></pre>