Hi,
The first step would be to reduce the problematic scenario to a minimal
one.
For example, you could set up a fresh project that uses Gradle, then
add just enough to reproduce the problem.
Then, you could work on reproducing the problem without even having
Gradle, maybe in a plain Java command.
Once that reproduces the issue, it would be good to reduce the complexity
even further so that Java is not required to reproduce the bug.
Once it is easy enough to reproduce for other people, it will either be
obvious what the root cause is, or other people could join the
investigation.
Ciao,
Johannes