Gradle polls/spins-up all system drives when starting a build

I have noticed that, whenever a build starts, EVERY drive in my PC spins up, even completely unrelated ones.
Is this a bug or is there a reason for this behavior? Either way, I find it a bit annoying:

*build*
*spinup* “it doesn’t work damn”
*5 minutes pass*
“a’ight let’s try this again.”
gradle run *HDD spinup sequence* *sigh*

One thing I can say is that with some? older versions, this doesn’t happen. One specific I can name is 4.8.1 as a GH project I had needed to compile uses that version and it doesn’t happen there.

Goes back to at least Gradle 7.1
Windows 10 21H2, JDK 11 (Eclipse Adoptium)

Maybe look at info or even debug logging to find what is happening when the drives spin up?

Hi,

If you don’t have file system watching explicitly enabled, Gradle needs to detect the type of all the drives. This probably causes to spin up all the drives on Windows. You can enable file system watching explicitely, so we wouldn’t need to probe the drives: The Gradle Daemon

Cheers,
Stefan