In the official post detailing the features of the stable release of Android Studio 2.1, I came across this:
We are also speeding up build times by using in-process dex, which converts class files to dex files within the Gradle daemon process. This avoids the costly processing operation of creating separate dex processes. To use this feature, you will need to increase the amount of memory available to the Gradle daemon to at least 2GB (1 GB is the default).
Please, how can I increase the memory that's available to Gradle?