title: Gradle Jacoco plugin not generating reports
body: <p>Java 8 and Gradle 4.6 here. I'm trying to configure my Gradle build to use the <a href="https://docs.gradle.org/current/userguide/jacoco_plugin.html" rel="noreferrer">Jacoco Plugin</a> but am having some difficulty. I've already got it working with Checkstyle and Findbugs, such that running <code>./gradlew clean build</code> invokes the Checkstyle and Findbugs tasks because they're dependencies of the <code>check</code> task.</p>
  
  <p>I'm now trying to get Jacoco working such that:</p>
  
  <ol>
  <li>It excludes my <code>com.me.myapp.domain.model</code> package and all of its contents; and</li>
  <li>It fails my build if code coverage on the non-excluded classes falls below 70%; and</li>
  <li>Pass or fail, I want an HTML version of the Jacoco report generated under the <code>build/</code> directory; and</li>
  <li><strong>Ideally</strong> I could just use the same Gradle command invocation of <code>./gradlew clean build</code> to get Jacoco working like this</li>
  </ol>
  
  <p>My best attempt thus far:</p>
  
  <pre><code>plugins {
      id 'java-library'
      id 'checkstyle'
      id 'findbugs'
      id 'jacoco'
  }
  
  dependencies {
      compile(
          'org.hibernate:hibernate-core:5.0.12.Final'
          ,'com.fasterxml.jackson.core:jackson-core:2.8.10'
          ,'com.fasterxml.jackson.core:jackson-databind:2.8.10'
          ,'com.fasterxml.jackson.core:jackson-annotations:2.8.0'
      )
  
      testCompile(
          'junit:junit:4.12'
      )
  }
  
  repositories {
      jcenter()
      mavenCentral()
  }
  
  checkstyle {
      config = rootProject.resources.text.fromFile('buildConfig/checkstyle/checkstyle.xml')
      toolVersion = '8.11'
  }
  
  tasks.withType(FindBugs) {
      reports {
          xml.enabled false
          html.enabled true
      }
  }
  
  findbugs {
      excludeFilter = file('buildConfig/findbugs/findbugs-exclude.xml')
  }
  
  jacocoTestReport {
      reports {
          xml.enabled false
          csv.enabled false
          html.enabled true
      }
  
      afterEvaluate {
          classDirectories = files(classDirectories.files.collect {
              fileTree(dir: it,
                  exclude: [
                      'com/me/myapp/domain/model/**'
                  ]
              )
          })
      }
  }
  
  jacocoTestCoverageVerification {
      violationRules {
          rule {
              limit {
                  minimum = 0.7
              }
  
              failOnViolation true
          }
      }
  }
  
  jacoco {
      toolVersion = "0.8.1"
  }
  
  // to run coverage verification during the build (and fail when appropriate)
  check.dependsOn jacocoTestCoverageVerification
  </code></pre>
  
  <p>When I run <code>./gradlew clean build</code> with the following <code>build.gradle</code> above (^^^) Jacoco <em>does</em> fail the build if my coverage is less than 70%. <strong>However</strong> it does not generate any HTML report for me, which is not helpful at all in terms of fixing it.</p>
  
  <p><strong>Any ideas?</strong></p>