Modified synteax to delcare flatDir as the way it was done previously did not work on my gradle instance