Enable local caching for Gradle (#38882)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38882

This turns on local caching for Gradle builds.
From now on, some of the tasks of the build will be cached inside the `.gradle` folder.

This will benefit 'clean builds' and builds happening after branch/context switch.
CI will also benefit from this improvement as we're storing the cache folder on CircleCI.

After this we'll have to follow-up and enabling `Cacheable` on each of our task as
they're currently all disabled.

Changelog:
[Internal] [Changed] - Enable local caching for Gradle

Reviewed By: mdvacca

Differential Revision: D48187656

fbshipit-source-id: 25734ed692a69874721e86c50498b075af0fda19
This commit is contained in:
Nicola Corti 2023-08-09 17:32:43 -07:00 committed by Facebook GitHub Bot
parent c2c7462705
commit 28dd1bbe0f
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.caching=true
android.useAndroidX=true

View File

@ -0,0 +1,2 @@
org.gradle.caching=true