What does "Update All Gradle Projects" do?

I am trying to create a gradle plugin that generates some sources when the button "Refresh all gradle projects" in the gradle panel. I assume IntelliJ is fulfilling some gradle goal, but I cannot find any documentation to figure out which goal or goals are being executed.

This is for an Android project, and I heard that he suggested using project.preBuild.dependsOn task , but I couldn’t get this to work every time I update (it only works for the first time).

Update all gradle Projects

+4
source share
1 answer

If you look at the documentation for Intellij IDEA at https://www.jetbrains.com/idea/help/synchronizing-changes-in-gradle-project-and-intellij-idea-project.html

When you click the refresh button in the gradle tool window, the following is done:

When this button is clicked, IntelliJ IDEA analyzes the project structure and displays the detected differences (if any) in the gradle tool window.

It substantially updates the project structure from any changes to gradle. It may be difficult to find the specific task that it calls, because under the hood it uses the gradle Tooling API ( https://docs.gradle.org/current/userguide/embedding.html ) to complete all tasks and receive information about every project.

0
source

All Articles