Expected Use of Gradle and Git In a Branching Environment

Note: I did attempt several searches both on this forum and the internet-at-large for information on this, but wasn’t able to find much - if you have better luck, please feel free to direct me to what you’ve found, and I apologize for the duplication.


I work in an environment where we make heavy use of Git branching in our daily routine. This effectively means that members of our team change branches frequently.

When using Gradle in this environment, we’ve noticed that we often have to run “clean” and/or stop the daemon every time we switch branches, as Gradle seems to not realize input files have changed since the last generation of output (my guess is that “updated date” is being used instead of some sort of content sum to determine if input is newer than output)

This is causing a lot of lost time, both in general operation and in debugging issues, only to find out someone forgot to wipe their workspace


Is there a recommended configuration for working in this environment (other that completely disabling the daemon) that will make Gradle and Git cooperate in a more streamlined way, that our members don’t have to manually remember to manage?

If not, are there ongoing issues/discussions in how to improve this, or ways I could help with this?