title: Intellij Idea 12 gradle build
body: <p>I am trying to build a project with gradle from within Intellij Idea 12 (commercial editon) but this keeps failing. I have the <strong>gradle plugin</strong> enabled and also the <strong>gradle gui</strong> plugin. The native project gradle import is working. (I'm not using <code>gradle idea</code> btw.)</p>
  
  <p>When using the <em>bash</em> I only run <code>gradle war</code> to build my web application. Now I want to do the same from within Intellij.</p>
  
  <p>The <strong>gradle gui</strong> plugin seems to be using the wrong JDK (I guess it's the one Idea uses, a 1.6 JDK) and therefor fails to compile because this is a JDK 1.7 project. And it doesn't integrate well into Idea because it seems like an external build process (like triggering external ant tasks).</p>
  
  <p>What I have done so far is to configure my own <strong>artifact</strong> in a way that is equivalent to the one <code>gradle war</code> would have build. But that means a lot of configuration and simply feels wrong. There should be a better way?</p>
  
  <p>So what do I have to do to make Idea compile a project in a way similar to the command line gradle task?</p>