'Gradle Build on SpongeForge' has encountered a problem

I tried to update my SpongeForge clone but I got this error :

http://pastebin.com/4e1yzxAb

Caused by: java.lang.OutOfMemoryError: Java heap space

You need to give the task more RAM.

You could try this:

Add the following line to ~/.gradle/gradle.properties: org.gradle.jvmargs=-Xmx3G