Gradle Java project: java.lang.OutOfMemoryError: Java heap space