IntelliJ 2019.1: Turn off Gradle sync
Answered
Hello, we have a massive Android project with many many modules and we use Buck + OkBuck for our builds. We don't want the IDE to try to do gradle sync or gradle build, yet when I open the project sync starts automatically and I can't figure out how to turn it off.
Please sign in to leave a comment.
You can't turn it off. Sync is needed to build the IDE project model from the Gradle Tooling API to configure the dependencies, source roots, etc and provide all the smart features IDE was designed for.
Thanks Serge. Unless I'm misunderstanding something, I think we use buck project to build the IDE project model.
See: https://buckbuild.com/command/project.html#intellij
In this case you should open the existing IntelliJ IDEA project instead of importing the project from build.gradle.
Also, Android projects are only Gradle based these days and I'm not sure they can even work without Gradle.
It happens when simply opening the project, I'm not reimporting. I let the IDE update then I just opened as usual to start working and it started to Gradle sync without me doing anything out of the ordinary.
We have no support for buck build system, so it falls back to Gradle. Feature request for the buck support is welcome at https://youtrack.jetbrains.com/issues/IDEA.
Hi Serge,
Our project is configured with Gradle, however we use a different tool to generate the IntelliJ iml files. The problem we are seeing is that Gradle sync is being automatically run even though the project is just opened and not imported. This is a new behavior when we upgraded to 2019.1. Was this an intentional change? If so, is there no setting to make IntelliJ behave the same as older versions?
Please see https://youtrack.jetbrains.com/issue/IDEA-210372#focus=streamItem-27-3387085.0-0 .
Does it happen with Android plug-in disabled?
With the Android plugin disabled, it no longer automatically performs a gradle sync.
What's being described here is a massive regression from IDEA 2018 to IDEA 2019, which prevents us from upgrading. The setting to disable gradle autosync is no longer being honored when starting the app.
There are hundreds or thousands of us working on large Android projects whose gradle configs choke the Android Gradle Plugin. To get any work done we have, for years, resorted to using okbuck, gradlew idea, or other means to generate our IDEA configs files instead. We are trapped on IDEA 2018 until this is resolved.
Update: see related issue https://youtrack.jetbrains.com/issue/IDEA-210372
@Rjrjr we are really sorry for this inconvenience. We are in touch with Android Studio Google team for this issue. I hope the fix will be included already in nearest IntelliJ IDEA IDE updates. I will clarify the status and provide the update in IDEA-210372 issue.
Fantastic, thanks!
Hi guys, there's a new button to disable this behaviour now, see https://youtrack.jetbrains.com/issue/IDEA-237299#focus=streamItem-27-4115978.0-0