Reputation: 1030
I am attempting to play around with Gradle integration in IntelliJ Idea (Ultimate) v12.
It seems even if $GRADLE_HOME is configured properly, basic syntax such as 'apply', 'dependencies', etc. is not recognized.
I would seem like the solution should be something simple. Any help is appreciated.
Upvotes: 13
Views: 4123
Reputation: 178
With Intellij 14 and Gradle 2.3 I found that adding {$GRADLE_HOME}/lib
and {$GRADLE_HOME}/lib/plugins
as libraries in my project settings got rid of all the warnings like "dependencies cannot be applied to groovy.lang.Closure".
Upvotes: 1
Reputation: 95
I'm using Intellij 13 and have had similar problems. What I noticed was, creating a new Project from Intellij (i.e. new Groovy Project or Gradle project), I get the syntax error markers. I also have noticed it didn't do a good job pulling in Gradle dependencies.
On the other hand, if I Import a Project through an already created build.gradle file, the syntax error markings go away and the dependencies seem to play more nicely. Not sure if this works for you.
Upvotes: 1
Reputation: 1851
I was having the same problem until this morning. I did the following steps and it solved itself:
I think doing the first one and restarting may be enough, but I'm not sure.
Upvotes: 2
Reputation: 123986
IntelliJ IDEA doesn't currently offer syntax completion for Gradle build scripts. All you get is the standard Groovy support.
Upvotes: 4