title: Try With Resources Not Supported at This Language Level
body: <p>I'm using IntelliJ IDEA Ultimate 2016.2.1, have set Project SDK to my 1.8 version, Project Language Level to 8, Module SDK to my 1.8 version, and JDK home path to /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home.</p>
  
  <p>I have restarted the IDE.</p>
  
  <p>Still, I am getting ugly warnings about try-with-resources not supported at this language level. I have not used less than language level 8 in IntelliJ so this can't be due to something not refreshing. I am using a gradle build configuration - cleaned built and tried to run - says I'm running 1.5 but I can't figure out where 1.5 is mentioned. In build.gradle i'm using:</p>
  
  <pre><code> apply plugin: 'java'
   apply plugin: 'application'
   sourceCompatibility = 1.8
  </code></pre>
  
  <p>Should I file an IntelliJ bug or am I still missing something?</p>
  
  <p>EDIT:</p>
  
  <p>Running gradle in termianl outside of IntelliJ's system runs it fine. So the problem is IntelliJ related. </p>