I used gradle build command in Centos 7 terminal and I got output:
FAILURE: Build failed with an exception. * What we
The Problem solved by simply using "sudo" and giving access to gradle to create a folder and write cache. use:
sudo ./gradlew