Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

Speed up Android builds #49567

Open roryabraham opened 2 hours ago

roryabraham commented 2 hours ago

Problem

Android builds typically take 10-30 minutes on my M2 Mac, which is a long time.

Solution

Research ways to speed them up

roryabraham commented 2 hours ago

There are a few things I'd like to try:

roryabraham commented 2 hours ago

In order to be methodic and quantitative with these changes, I'll be using ./gradlew build --scan to generate detailed build scan reports.

saifelance commented 2 hours ago

@roryabraham I’m very interested in this task and confident in my ability to deliver high-quality results. I'd love to take on this project—are you ready to assign it to me?

roryabraham commented 1 hour ago

@saifelance I appreciate your interest, but please only post proposals on issues labeled Help Wanted. You can read more about contributing to our repo in https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md. Thanks!

roryabraham commented 1 hour ago

Build scan for a clean ./gradlew assembleDebug (note: next time I should do active arch only, because that's what we do in dev)

https://scans.gradle.com/s/4e4x4kl55d3js

roryabraham commented 31 minutes ago

Another clean build scan, this time only one arch: https://scans.gradle.com/s/4apezfw7xtotm

roryabraham commented 16 minutes ago

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

https://scans.gradle.com/s/67qe4vuqgytyq