Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.25 KB

building.md

File metadata and controls

41 lines (31 loc) · 1.25 KB

Building

The following file documents possible modifications for building Android projects.

Table of contents

Run Gradle daemon

Keeps Gradle running in the background as a daemon. This may speed up compilation times.

Procedure

  1. Go to the project's Gradle properties file (NOT the module's Gradle file)

gradle-properties

  1. Place the following code:
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

Note: The second line specifies how much memory will be allocated for the daemon process. Use a suitable value according to your computer's RAM memory size. Don't use too much, remember that you will need memory for Android Studio as well.

Enable incremental DEX building

Enables incremental building of Android's DEX files. This may speed up compilation times.

Procedure

  1. Go to the app's module Gradle file (the same file used for dependencies)
  2. Place the following code:
dexOptions {
  incremental true
}