How to improve the build speed of your Android projects
Recently, I undertook the task of migrating the Android codebase at Kure to AndroidX. It seemed like the perfect opportunity to try and fix the build speeds of the project. Gradle has always had a bad rep for being slow and resource-intensive, but I was quite surprised at how minor changes to the project’s build configuration could massively improve the build speeds. To give you a sneak peek of the time I was able to shed from our clean builds, here’s a before and after metric from the build scan. pre-optimisation 🐢🐢 post-optimization ⚡️⚡️ Going down from 5.5 minutes to 17 seconds?? That’s bonkers It’s easy to go overboard with optimizations that you can perform to bring down your build time even further. But I am going to intentionally focus on the minor, painless measures I took to come close to this metric for the sake of keeping this post, beginner-friendly. But first! Before starting off with the optimization, it’s important to benchmark our project...
Comments
Post a Comment