I was getting an error when trying to compile my application within Intellij
:
Error:Cannot compile Groovy files: no Groovy library is defined for module
I solved this issue by selecting "Configure Groovy SDK"
for the module, when prompted by Inteli. I used library org.codehaus.groovy:groovy-all:2.4.4
, this then adds this library as a dependency
for the module.
The issue is that each time I re-build my project or "refresh gradle projects" in Intellij I have to "Configure Groovy SDK" again.
How can I set up my project so that I don't have to re-do this step each time?
add groovy-all as a dependency to in your pom.xml (if you're using maven) or your build.gradle (for gradle). Otherwise every time your refresh or sync, intellij will remove the "extra" dependency it finds.
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.6</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With