Trying to understand your problem, I cloned the repository and tried to run gradle on my local machine (ArchLinux) in the same way that Travis tries:
./gradlew build
And I got the same error message:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
This is really strange, and I have never seen him before. So I asked myself: where is gradle looking for this class? Right, in the wrapper container file. And it seems empty:
$ ls -lh gradle/wrapper/
total 4.0K
-rw-r--r-- 1 msrd0 users 0 Sep 16 23:51 gradle-wrapper.jar
-rw-r--r-- 1 msrd0 users 230 Sep 16 23:51 gradle-wrapper.properties
TL DR
Whatever happens, your loaded gradle wrapper is empty. You need to load the shell again, on Linux you can use this command (if you have gradle installed):
gradle wrapper
If your local gradle distribution is out of date and you want to keep the version used in your repo, do:
gradle wrapper --gradle-version=4.1
msrd0 source
share