title: Display test coverage using jacoco in gradle
body: <p>I am using a gradle file to build my project. In this file I am using jacoco to produce a test report. What I want to do is modify the build file so that it displays a message if my test coverage isn't 100%. Or at least just display the test coverage. Is this possible?</p>
  
  <p>Here is my build.gradle:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'jacoco'
  
  sourceSets.main.java.srcDirs = ['src']
  sourceSets.test.java.srcDirs = ['test']
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: "4.+"
  }
  
  repositories {
      mavenCentral()
  }
  
  jacocoTestReport {
      doFirst {
        classDirectories = files('build/classes/main/draw')
      }
      reports {
          xml.enabled false
          csv.enabled false
          html.destination "build/reports/coverageHtml"
      }
  }
  
  task(runui, dependsOn: jar, type: JavaExec) {
  
      main = 'gui.Main'
      classpath = sourceSets.main.runtimeClasspath
  }
  
  defaultTasks 'clean', 'test', 'jacocoTestReport', 'runui'
  </code></pre>