title: jacoco not excluding files and print not working in jacocoTestReport task to debug it
body: <p>My full build file is <a href="https://github.com/deanhiller/webpieces/blob/master/build.gradle" rel="nofollow noreferrer">https://github.com/deanhiller/webpieces/blob/master/build.gradle</a></p>
  
  <p>but I am just modifying the jacocoTestReport section to the following.</p>
  
  <p>ie.</p>
  
  <ol>
  <li>Clone project</li>
  <li>replace jacocoTestReport section with my code below</li>
  <li>Run ./gradlew :webserver:http-router:build</li>
  <li>open up webserver/http-router/output/reports/jacoco/test/html/index.html</li>
  <li>NOTICE that the Exception classes are still there in the report</li>
  </ol>
  
  <p>The code </p>
  
  <pre><code>   jacocoTestReport {
        additionalSourceDirs = files(sourceSets.main.allSource.srcDirs)
        sourceDirectories = files(sourceSets.main.allSource.srcDirs)
        classDirectories = files(sourceSets.main.output.filter { file -&gt;
           if(file.getName().endsWith("Exception.class")) {
              print("Excluded:"+file.getName());
              return false;
           }
           print("Included:"+file.getName());
           return true;
        })
        executionData.from = fileTree(buildDir).include("/jacoco/*.exec")
        reports {
            html.enabled = true
            xml.enabled = true
            csv.enabled = false
        }
     }
  </code></pre>
  
  <p>The print statements for debugging are not happening and all the Exception constructors are showing up.  It doesn't even print included files which I don't get at all.</p>