Gradle build incredibly slow

Sherlock

Build time right now is ranging around ~2-4 min.

I'm using about 11 libraries provided via Gradle.

I have the following set:

buildTypes {
    debug {
        multiDexEnabled = true
        applicationIdSuffix ".debug"
        minifyEnabled false
        proguardFile 'proguard-rules.pro'
    }
}

dexOptions {
    javaMaxHeapSize "4096M"
    preDexLibraries false
    jumboMode = true
    incremental = true
}

Gradle: Offline mode

I have the following setting in gradle.properties org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

In the global properties I have:

org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true

I've looked through about every article I can find on it on Google/Stackoverflow.

Is there any way to speed the process up to below 1 minute at least?

Update August 6, 2015

These really helped speed things up for me.

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip

build.gradle project dependencies

classpath 'com.android.tools.build:gradle:1.3.0'

Update August 9, 2015

I've found that as it turns out using Protoc is very very slow for Android. I switched to Wire and it took the compilation time from 2 min. to 10s-30s.

Ayzen

I found that multiDexEnabled = true makes my build process extremely slow. I don't know if it's possible to improve it's performance somehow, but for now I just turned it off.

You have to use it only if amount of methods in your project (including libraries) goes beyond 65k limit. Maybe you can cut off some of your 11 libraries, then turning off multiDexEnabled option should solve your problem.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Why are HashSets of structs with nullable values incredibly slow?

From Java

Gradle build slow on transformClassesWithDexForDebug

From Dev

Multi-Peer Connectivity in iOS 7 transfers incredibly slow

From Dev

RenderInContext is incredibly slow on iOS7

From Dev

Visual Studio incredibly slow when renaming files

From Dev

Why does '@' in add_definitions() make CMake incredibly slow?

From Dev

Word VBA: iterating through characters incredibly slow

From Dev

Incredibly slow runtime on text search [Optimization]

From Dev

Gradle build (Android project) is very slow

From Dev

Intellij, how to disable the incredibly slow animation of tool windows

From Dev

gradle - Android Studio build too slow multidex application

From Dev

while read incredibly slow

From Dev

Python pandas: banal apply statements incredibly slow

From Dev

Gradle build is very slow after adding Android Design Support library

From Dev

Django generating test data incredibly slow

From Dev

POS-Tagger is incredibly slow

From Dev

Build Gradle Android studio Build Slow

From Dev

My Akka.Net Demo is incredibly slow

From Dev

Android build gradle is too slow (Dependency Resolution)

From Dev

Any solution for Android Studio slow gradle build and high disk usage?

From Dev

PHP Code Sniffer via Grunt is incredibly slow

From Dev

SSE incredibly slow

From Dev

a*star pathfinding visualization is incredibly slow / python

From Dev

Vector push_back incredibly slow

From Dev

Lenovo Y50 incredibly slow WiFi

From Dev

Linux C++ new operator incredibly slow

From Dev

18.04 Searching for file names is incredibly slow

From Dev

Eclipse Neon running GAE is incredibly slow to refresh

From Dev

Program to guess number gets incredibly slow

Related Related

  1. 1

    Why are HashSets of structs with nullable values incredibly slow?

  2. 2

    Gradle build slow on transformClassesWithDexForDebug

  3. 3

    Multi-Peer Connectivity in iOS 7 transfers incredibly slow

  4. 4

    RenderInContext is incredibly slow on iOS7

  5. 5

    Visual Studio incredibly slow when renaming files

  6. 6

    Why does '@' in add_definitions() make CMake incredibly slow?

  7. 7

    Word VBA: iterating through characters incredibly slow

  8. 8

    Incredibly slow runtime on text search [Optimization]

  9. 9

    Gradle build (Android project) is very slow

  10. 10

    Intellij, how to disable the incredibly slow animation of tool windows

  11. 11

    gradle - Android Studio build too slow multidex application

  12. 12

    while read incredibly slow

  13. 13

    Python pandas: banal apply statements incredibly slow

  14. 14

    Gradle build is very slow after adding Android Design Support library

  15. 15

    Django generating test data incredibly slow

  16. 16

    POS-Tagger is incredibly slow

  17. 17

    Build Gradle Android studio Build Slow

  18. 18

    My Akka.Net Demo is incredibly slow

  19. 19

    Android build gradle is too slow (Dependency Resolution)

  20. 20

    Any solution for Android Studio slow gradle build and high disk usage?

  21. 21

    PHP Code Sniffer via Grunt is incredibly slow

  22. 22

    SSE incredibly slow

  23. 23

    a*star pathfinding visualization is incredibly slow / python

  24. 24

    Vector push_back incredibly slow

  25. 25

    Lenovo Y50 incredibly slow WiFi

  26. 26

    Linux C++ new operator incredibly slow

  27. 27

    18.04 Searching for file names is incredibly slow

  28. 28

    Eclipse Neon running GAE is incredibly slow to refresh

  29. 29

    Program to guess number gets incredibly slow

HotTag

Archive