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).

source share