Oh! #Gradle, Why so slow?
Submitted by Arun Babu A S P (@arunbabuasp) on Wednesday, 10 August 2016
Full talk (40 minutes)
This talk will cover various measures that can be taken to improve the build speed. Starting from obvious tips, will quickly jump into more advanced options which worked beautifully for the large project that produces Dailyhunt app. As part of the process, various ways to measure time taken by different tasks will also be discussed.
- Daemon enabled - Parallel execution - Configuration on demand - Build cache (new guy in town) - Large heap allocation
Leveraging dex options properly
- dexInProcess enabled - javaMaxHeapSize & maxProcessCount - preDexLibraries (slower clean build)
Instant run (For debug config)
- Set minSdkVersion as 21 - Disable proguard - Disable Windows defender for project folder - Disable crashlytics & other plugins
- settings.gradle for dev - Modules included as aar - Modules included as no-op - Independent modules with DI
- --profile - Build scan plugin - Build time tracker plugin
More weapons (For dev setup)
- Disable tasks with name "Test" - Try JACK tool chain - SSD for project folder - RAM disk for project folder
Android developer, a victim affected by slow android build
- Arun Babu A S P, Architect (Android) with more than 10 years of experience building mobile apps