I was fed up with the slow build of android on my local machine. The way I solved this was spinning up a high-end machine on AWS and rsyncing the code from my local to the machine and compiling it over there.
I saw an immediate increase in the performance and my local system was saved from CPU hog. Check out this tool I created to help the developers speed up their terminal https://stormyapp.com