Yes, there is. You can put the following line in your build script:
buildDir = 'your_directory'
Or in gradle.properties file (no quotes around your_directory in that case).
Build directory is a project property. You can view all project properties available to you by typing:
gradle properties