We use Gradle Wrapper for all of our projects, but one of our tools (IntelliJ IDEA) often re-runs which changes the first line - a comment about when the file was generated - every time it starts. This change tends to add queries to the query, which means high potential for unnecessary merge conflicts.
The correct solution would be to ensure that all developers never check the file unless it actually changed in a meaningful way, but developers (including me) can be hasty and forgetful, so the file is regularly displayed in stretch requests.
I had several ideas to solve this problem, but I can not solve any of them.
Make Git ignore the first line of gradle -wrapper.properties, for example, which seems cumbersome and must be run by each developer since it is local.
Add a tail to the gradle shell task, which removes the first line of gradle -wrapper.properties, with a little hack.
Somehow they force IDEA not to start the shell task automatically every time the project is synchronized, I donβt know how to do it.
I am leaning towards 2. right now, but I would like to hear if anyone has any other ideas.
source share