droidconIN 2016

The sixth edition of droidconIN

Arun Babu A S P

@arunbabuasp

Oh! #Gradle, Why so slow?

Submitted Aug 10, 2016

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

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

droidconIN is an annual conference on Android, part of the worldwide series of events. more