I have an Android Studio project that has only the file gradle-wrapper.properties
and when I run the build I get a message that I have to add a new property to the gradle.properties
, but that file is not in the project.
The message is the following:
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB. To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
The question is, is it the same to add the property to gradle-wrapper.properties
, instead of gradle.properties
? Should I create the new file gradle.properties
to add the property org.gradle.jvmargs=-Xmx2048M
inside?
It is NOT the same.
The ones in the wrapper are configurations of the local versions of gradle and will not be propagated outside your environment (for example to the rest of your team if they use GIT).
The
gradle.properties
one at the root of your project is the one that governs how your project works, that's the one you should edit.