Search code examples
gradlebuildtmpfs

Gradle move build folder to /tmp


I wonder how is it possible to move build folder to somewhere, like /tmp.

In my case /tmp folder is tmpfs, home folder is encrypted. I see no reason why not to speedup build process and decrease load of hard disk.


Solution

  • Yes, it can be changed with setBuildDir method. This method takes a path argument.

    buildDir = '/path/to/dir`