-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up Android builds #49567
Comments
There are a few things I'd like to try:
|
In order to be methodic and quantitative with these changes, I'll be using |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Build scan for a clean |
Another clean build scan, this time only one arch: https://scans.gradle.com/s/4apezfw7xtotm Build command was: |
A build scan with only this diff: diff --git a/android/gradle.properties b/android/gradle.properties
index 87333d20f74..1f60a7d335d 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -55,3 +55,6 @@ MYAPP_UPLOAD_KEY_ALIAS=ReactNativeChat-Key-Alias
disableFrameProcessors=true
android.nonTransitiveRClass=false
+
+org.gradle.parallel=true |
Adding the
|
Going to try the configuration cache field with: ./gradlew assembleDebug --configuration-cache -PreactNativeArchitectures=arm64-v8a --scan Edit: 2nd build w/ configuration cache enabled failed 😞 Logs
|
This branch enabling ccache for Android builds also does not seem to materially improve the configuration time. Not sure if it's all done correctly though |
Another simple thing we could try is providing more RAM to the gradle build. Pretty sure it gets only 512MB by default. We could try bumping that to 2048 (or even higher) and see if it helps |
Problem
Android builds typically take 10-30 minutes on my M2 Mac, which is a long time.
Solution
Research ways to speed them up
The text was updated successfully, but these errors were encountered: