Skip to content

Instantly share code, notes, and snippets.

@cbedoy
Forked from PepDevils/gradle.java
Created February 21, 2018 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbedoy/9896572895f8f7088146d646897bb62f to your computer and use it in GitHub Desktop.
Save cbedoy/9896572895f8f7088146d646897bb62f to your computer and use it in GitHub Desktop.
Faster gradle compile for android
//link:
// https://medium.com/@kevalpatel2106/how-to-decrease-your-gradle-build-time-by-65-310b572b0c43#.4rmzrcuj9
// https://gradle.org/install
//no terminal depois de ter o device instalado uma vez, usar
./gradlew android:assembleDebug --profile --configure-on-demand --daemon
// or this "app" root file name:
./gradlew app:assembleDebug --profile --configure-on-demand --daemon
//no ficheiro "gradle-wrapper.proporties", utilizar versão mais actualizada em fevereiro de 2017 é:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
//no ficheiro "gradle.properties", ou no sistema utilizar:
#Enable daemon
org.gradle.daemon=true
# Try and findout the best heap size for your project build.
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Modularise your project and enable parallel build
org.gradle.parallel=true
# Enable configure on demand.
org.gradle.configureondemand=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment