How to completely isolate builds from each other?

Our large git repo is the base for multiple different projects. So the “common” and product specific source code sits all tightly together. We reworked our home grown build tool to use gradle for the java related compilation. Works nicely … locally.

But our gerrit verification build keeps failing intermittently. Because: it is setup to “build” our different products in parallel.

And albeit we already invested quite some energy (for example by separating not only the output paths, but also using different GRADLE USER HOME directories for the different product builds), the parallel builds sometimes step on each other, leading to various kinds of failures.

“Simple question though”: are there (robust) ways to have multiple parallel gradle builds, running on the same machine, using a shared “input sources” folder?