title: Gradle build with Java 8
body: <p>I'm trying to build Java 8 project with Gradle 1.6, but I'm stuck on this error:</p>
  
  <pre><code>Execution failed for task ':ejb:compileJava'
  invalid target release: 1.8
  </code></pre>
  
  <p>JAVA_HOME is set as "D:\Program Files\Java\jdk1.8.0", and build.gradle contains these lines:</p>
  
  <pre><code>sourceCompatibility = JavaVersion.VERSION_1_8
  targetCompatibility = JavaVersion.VERSION_1_8
  </code></pre>