How to use all CPU cores/threads when running Android Studio gradle build?

in the local.properties file in my project I have

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

additionally you can specify

org.gradle.parallel.threads

which specifies the maximum number of threads to use for parallel execution. it needs org.gradle.parallel=true. Here you can find more information about it

Leave a Comment