title: Invalid source release 1.7 error when compiling with gradle
body: <p>I need 1.7 for a library which uses diamond operators.  </p>
  
  <p>I followed <a href="https://stackoverflow.com/questions/14487682/diamond-operator-is-not-supported">these</a> sO answers...but no joy. </p>
  
  <p>From gradle build </p>
  
  <pre><code>    compileSdkVersion 19
  buildToolsVersion '19.0.3'
  
  compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7
  }
  
  defaultConfig {
      minSdkVersion 10
      targetSdkVersion 19
      versionCode 22
      versionName "1.3.1"
  }
  </code></pre>
  
  <p>Error: Execution failed for task ':MyApp:compileDefaultFlavorDebugJava'.</p>
  
  <blockquote>
    <p>invalid source release: 1.7</p>
  </blockquote>
  
  <p>Java home is set : $ echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home</p>