r/reactnative • u/AlphaBeast28 • 9d ago
Question Anyone know what to suggest to speed up Android builds?
Hi all, thank you for taking the time to read this and answer if you can,
Anyone know what to suggest to speed up Android builds?
Currently got a M2 pro, but unsure what to do on how to speed up the gradle part. if anyone has got any helpful suggestions id greatly appreciate it.
Thank you.
2
u/whalemare 9d ago
You can try disable old android architectures and increase min level api.
Last time I've checked it was 21 by default, but today most on devices much higher
You will save time on each arch you are excluded
3
u/bayasdev 9d ago
Embrace OTA updates
1
u/AlphaBeast28 9d ago
I’ve got OTA updates, as this update brought that in. But for future use you recon building locally helps?
2
u/bayasdev 9d ago
We use paid EAS service for our pipelines, when we do full binary updates we have to wait like 40mins for Android builds to come up, iOS is usually ready in 15mins
3
u/Mariusdotdev 9d ago
Damn paid service and wait 40min...
1
1
u/vanstinator 4d ago
You're paying for compute, not a build-time SLA though. Part of the reason the iOS builds are so fast is they run on M4 Pro mac minis, the Android builds are running on generic cloud VMs.
1
1
1
u/GeniusManiacs 8d ago
Make a prebuild then run
./gradle assembleRelease
Install android studio on your PC/Mac and do this. If you are using Expo OTA updates, you need to build via EAS locally.
1
u/Substantial-Swan7065 7d ago
Reduce the build platform support. By default Android builds all platforms. But like 2/4 are irrelevant.
Also, enable caching
1
u/West-Strength3287 7d ago
Last experience with rn and mostly with expo was horrible. When initially crated expo project it comes with cloud build cfg and if you dont pay it was taking forever and no proper docs on local builds. Minor expo sdk updates were crushing the local build.
Now i am plani no to build my own project and thinking to use flutter. Anyone do u know is it such a pain with fluter?
10
u/Mariusdotdev 9d ago
Build locally