I'd like to build certain projects without the use of of Gradle daemon. I've read that this can be done either by command-line argument --no-daemon
or by changing Gradle properties under .gradle/
. I need to disable it for just some of the projects I build under the root project though.
Is it possible via settings.gradle
/build.gradle
settings or am I better off making custom build script?
You can call . \gradlew --stop in a Terminal and it will kill all gradle processes in Android Studio for Windows OS. You Can find terminal at left bottom of your android studio for windows. Save this answer.
Note that it requires you to have gradlew executable in the project directory (it's there by default when using Android Studio). After the installation you can find "Gradle Stop" button on Main Toolbar and inside Run Menu. Please leave all your bug-reports and feature-requests on Github page.
The Gradle Daemon keeps the Gradle Framework initialized and running, and caches project data in memory to improve performance. To enable the Daemon for a single build, you can simply pass the --daemon argument to your gradle command or Gradle Wrapper script.
It avoids expensive bootstrapping process and leverages caching. So, there is no reason not to utilize Gradle Daemon. In the local environment, it is true. However, it could be wrong if you use CI agents such as Jenkins and TeamCity.
You can simply add org.gradle.daemon=false
to a gradle.properties
file in the project root folder.
The daemon documentation mainly talks about disabling the daemon altogether on a machine but the gradle properties documentation indicates that the location where a property / value pair is declared is irrelevant, they are sourced from different location, with overwrite rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With