title: Configuring groovy SDK within Intellij: have to repeat this each time project is built?
body: <p>I was getting an error when trying to compile my application within <code>Intellij</code>:</p>
  
  <blockquote>
    <p>Error:Cannot compile Groovy files: no Groovy library is defined for module</p>
  </blockquote>
  
  <p>I solved this issue by selecting <code>"Configure Groovy SDK"</code> for the module, when prompted by Inteli. I used library <code>org.codehaus.groovy:groovy-all:2.4.4</code> , this then adds this library as a <code>dependency</code> for the module. </p>
  
  <p>The issue is that each time I <em>re-build</em> my project or <em>"refresh gradle projects"</em> in Intellij I have to "Configure Groovy SDK" again. </p>
  
  <p>How can I set up my project so that I <em>don't have to re-do</em> this step each time?</p>