Does Gradle support out-of-source builds?

Hello, It is unclear to me if Gradle supports out-of-source builds. We currently use CMake for our C++ projects and the build directory is completely separate from the source. This allows us to make changes, build and push changes without concern of polluting the source with build files, logs and artifacts. Those files can be managed with a mercurial .hgignore file, but there is always the risk of polluting the source.

How do people handle this in Gradle?


Reconfiguring ‘project.buildDir’ for all subprojects should do the job. You’d still run commands from the source tree, but nothing would get written there.