My project has git submodule in use. Im having a l...
# community-support
r
My project has git submodule in use. Im having a lot of issues switching branches that have different versions in the submodule. When I switch to branch X the cache of gradle still insists on files from branch X submodule. The only thing that i found so far to get passed it is to delete the ~/.gradle/ repo from the computer (not the project). help? 🙏
v
That sounds very strange an unnormal. Gradle does not know anything about whether files are in Git submodules or not. For Gradle they are just files. So whether the files are directly in the repo or coming from a submodule should not make any difference. Can you knit an MCVE that demonstrates the problem you are seeing?
r
Im not sure I know how to reproduce it. Its very illusive. It can happen for one of the repo user constantly and for another rarely. Any tips on how to approach the issue?. The caching issue happens only to files that originated from the git submodule, not files originating in the actual repo im working in
v
Not really. If a task is run though it should be up to date it is easier as you can check
--info
log. Are the tasks up to date? Or from cache? Not sure where there a build scan could help gaining some insights.