Skip to content

Instantly share code, notes, and snippets.

@cbarraco
Created February 25, 2019 03:19
Show Gist options
  • Save cbarraco/11f410a3414d147552b9d9583cbd16ee to your computer and use it in GitHub Desktop.
Save cbarraco/11f410a3414d147552b9d9583cbd16ee to your computer and use it in GitHub Desktop.
Gradle build optimization for compiling Android apps
// Add this in your global gradle.properties file
// at ~/.gradle/gradle.properties
// Enable Gradle Daemon
org.gradle.daemon=true
// Enable Configure on demand
org.gradle.configureondemand=true
//Enable parallel builds
org.gradle.parallel=true
// Enable Build Cache
android.enableBuildCache=true
//Enable simple gradle caching
org.gradle.caching=true
// Increase memory allotted to JVM
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment