title: jacoco test report not excluding a package
body: <p>I'm trying to exclude from jacoco coverage an entire package, but it's not working.<br>
  I've followed the instructions reported in this answer <a href="https://stackoverflow.com/questions/29887805/filter-jacoco-coverage-reports-with-gradle">Filter JaCoCo coverage reports with Gradle</a> , but it seems that it is not working for me.
  This is the code:</p>
  
  <pre><code>jacocoTestReport {
    reports {
      xml.enabled false
      csv.enabled false
      html.destination "${buildDir}/jacocoHtml"
    }
    afterEvaluate {
      classDirectories = files(classDirectories.files.collect {
          fileTree(dir: it,
                  exclude: ['it.unibo.distributedBLS.main/**'])
      })
    }
  }
  </code></pre>
  
  <p>I've also tried variations like excludes +=, writing</p>
  
  <pre><code>'**/it.unibo.distributedBLS.main/**'
  </code></pre>
  
  <p>and also by adding</p>
  
  <pre><code>test {
    jacoco {
      excludes += ['it.unibo.distributedBLS.main/**',     
    }
  }
  </code></pre>
  
  <p>but still not working.<br>
  One thing not clear to me it's what "dir: it" stands for: what should I put there? Could it be that the error? </p>