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

前端 未结 3 705
青春惊慌失措
青春惊慌失措 2021-01-30 23:13

I\'m looking for a parameter or configuration in Android Studio / Gradle, that can set the build so it will use all of my CPU cores during build time. i.e. If I have a quad-co

3条回答
  •  一个人的身影
    2021-01-30 23:38

    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

提交回复
热议问题