Change gradle working directory in a standard operating system way: where gradle is launched, and not where the build.gradle is located

I put my source repositories into the cloud and then need to build to a separate directory so that the build outputs are not constantly uploaded. As a workaround I’ve now created a separate local branch. In my experience tools like automake and cmake support building into a ‘current working directory’ rather than the build.gradle directory.