Speed Up Gradle Build Time - agileinfoways/Android-Guidelines GitHub Wiki

You can use below some important gradle configuration to speedup your project build time

  1. Enter below lines in gradle.properties
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx6144m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
  1. While building project if gradle finds any deprecated method usage in our code, it will start rebuilding our code by applying deprecation lint check. So gradle will take time in building. After adding below code in app level build.gradle file, we ask gradle to build app with ignoring deprecation lint check.
allprojects {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
    }
}
  1. Tips