title: How to set -source 1.7 in Android Studio and Gradle
body: <p>I'm getting following error when trying to compile my project in Android Studio:</p>
  
  <pre><code>Gradle: error: diamond operator is not supported in -source 1.6
  </code></pre>
  
  <p>I have 1.7 set as target in all project preferences I've found. Also the path displayed in project SDK's under 1.7 SDK is correct path to java 1.7 installation.</p>
  
  <p>Even when I run java -version in terminal, it tells me I'm running on java 1.7.</p>
  
  <p>I have tried to set JAVA_HOME env variable to this:</p>
  
  <pre><code>/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
  </code></pre>
  
  <p>The error does not go away.  How do I eliminate the error?</p>