The .gradle
folder in your project has always been there. It is known as the project-cache-dir
and can be overridden form the command-line.
I suspect the issue you are seeing has nothing to do with it, unless you accidentaly include it in your archive.
The behaviour you are mentioning is typical when one task depends on the output of another, but the de[ency has not been declared properly or the inputs of the second task are finalised prematurely.