Reputation: 171
So, I got weird problem. I moved from Eclipse to IntelliJ Idea. And when I'm typing/editing file build.gradle it's... lagging, very hard to write anything there. What can cause that? Refreshing didn't help.
Added plugin: apply plugin: 'idea' But can't see in IntelliJ Idea tasks for idea in Gradle perspective. When I open Eclipse everythings works fine, with Gradle plugin for eclipse I can see these tasks in the project etc. the idea tasks are only available from command line, not from intellij idea gui.
But I want to fix that annoying thing with typing in build.gradle... why it is lagging?!
Please, help.
Upvotes: 15
Views: 6306
Reputation: 4380
The following exclusion to my save actions plugin alleviated the problem for me:build\.gradle
Upvotes: 3
Reputation: 63
Been troubled by this myself recently. Was extremely slow just editing text in the build file like OP describes. Just solved it. When you've opened a project and added a build.gradle file afterwards it seems you have to "link the gradle project" for intellij to work as it should while editing this file.
One way of doing it:
A second way:
Upvotes: 6
Reputation: 1411
I have worked on android, that uses gradle for building. So assuming, that the same works for you, here are a few things that you should make sure of -
Have the latest version of Gradle. v2.4 for eg has a huge performance boost over previous versions. see this http://gradle.org/docs/current/userguide/gradle_wrapper.html to help yourself with that.
The next step is to enable the Gradle daemon. Using Daemon makes your builds startup faster.
Moving on, enable parallel build for your project. Parallel builds will cause your projects with multiple modules to be built in parallel.
You should usually be able to do this by adding a file named *gradle.properties*
in your .gradle
in your home directory (i.e., ~/.gradle/gradle.properties
). Add org.gradle.daemon=true
org.gradle.parallel=true
to the file. If this doesnt work, find a way to enable the same on your computer. It helps.
These work pretty well with regard to gradle speed when used while developing android apps using android studio. I would help you out with how to enable daemon as well but I am not aware of that.
Hope this helps.
Upvotes: 2