Gradle gets softlocked with .lock files

Hi, I’ve been having this problem for a few months. Whenever I try to run any gradle command, it errors with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
   > Timeout waiting to lock file hash cache (project/.gradle/7.4.2/fileHashes). It is currently in use by this Gradle process.Owner Operation: unknown
     Our operation: 
     Lock file: project/.gradle/7.4.2/fileHashes/fileHashes.lock

This error was from a gradle wrapper command, it shouldn’t of tried to build anything. I’ve tried deleting project/.gradle, ~/.gradle, restarting my computer, updating gradle, killing all the gradle processes after clearing the .gradle folders, nothing has fixed it. It’s been a few months since I’ve used gradle and I remember there was a fix that would fix it for a build or two, but I can’t remember the details and it never fully fixed it. I’m on MacOS 11.6.2, been happening with Gradle 7.3 and 7.4.2. It will also error for checksums.lock, dependencies-accessors.lock, and fileHashes.lock from any gradle command except gradle --status. This issue prevents me from working on almost anything with gradle and java. Please tell me if you know a solution. Thanks!

I copied the project to my computer’s main hard drive and all gradle commands work. I’ll update this reply if I find out more

Edit: the drive I had the project on is ExFAT
Edit 2: I’ve made a github issue because I believe that this is a bug: Issues with gradle on an exFAT filesystem on MacOS · Issue #20444 · gradle/gradle · GitHub