droidconIN 2016

The sixth edition of droidconIN

Oh! #Gradle, Why so slow?

Submitted by Arun Babu A S P (@arunbabuasp) on Wednesday, 10 August 2016

videocam_off

Technical level

Advanced

Section

Full talk (40 minutes)

Status

Submitted

Vote on this proposal

Login to vote

Total votes:  +23

Abstract

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.

Outline

Gradle configurations

- 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

Module management

- settings.gradle for dev
- Modules included as aar
- Modules included as no-op
- Independent modules with DI

Measuring speed

- --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

Requirements

Android developer, a victim affected by slow android build

Speaker bio

Links

Comments

Login with Twitter or Google to leave a comment