在特定项目中禁用Gradle守护程序 [英] Disabling Gradle daemon in a specific project

查看:58
本文介绍了在特定项目中禁用Gradle守护程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不使用Gradle守护程序的情况下构建某些项目.我已经读到,这可以通过命令行参数-no-daemon 来完成,也可以通过更改 .gradle/下的Gradle属性来完成.不过,我只需要针对根项目下的一些我构建的项目禁用它.

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.

是否可以通过 settings.gradle / build.gradle 设置进行设置?还是我最好制作自定义构建脚本?

Is it possible via settings.gradle/build.gradle settings or am I better off making custom build script?

推荐答案

您可以在 gradle.properties 文件中简单地将 org.gradle.daemon = false 添加到 gradle.properties 文件中项目根文件夹.

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.

这篇关于在特定项目中禁用Gradle守护程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆