title: Groovy and IntelliJ - getting code compiled
body: <p>I have IntelliJ 12 and some groovy code (along with a pile of java code) in a project.</p>
  
  <p>In intelliJ, i can see class A's import of some groovy code, and i have also included the library that has that code.</p>
  
  <p>However, while the package itself is in one colour (for the import), the actual class being imported is in red, which implies an issue of some sort. Hovering the mouse over it reveals no issue though.</p>
  
  <p>When i run a "make" or a "rebuild project" is where the problems start - i get </p>
  
  <pre><code>Groovyc: unable to resolve class com.blah.blah.blah.A
  </code></pre>
  
  <p>How can i resolve this?</p>
  
  <p>Currently, my project setup is like so:</p>
  
  <p>Under "Libraries" in (Project Structure -> Project Settings -> Libraries) I have:</p>
  
  <p>the jar file with all the groovy code
  the src jar file with all the groovy code</p>
  
  <p>In the "Modules" section i have the - well, i don't know what to call it, the column isn't labelled - the library name from the libraries section associated with the src and class files, and the little "export" button beside it is ticked.</p>
  
  <p>Incidentally, opening the class in intelliJ never shows the source code, which given the source is included struck me as weird.</p>
  
  <p><strong>Is there anything else I should need to do?</strong></p>
  
  <p><strong>I've worked this one out, but if anybody knows why groovy cannot be in the "Resource Patterns" list and wants an upvote, do chime in</strong></p>