如何控制gradle守护进程的输出

如何控制gradle守护进程的输出,gradle,gradle-daemon,Gradle,Gradle Daemon,我正在gradle构建中设置jvm参数,它给了我一个稍微烦人的消息: Note: in order to honour the org.gradle.jvmargs and/or org.gradle.java.home values specified for this build, it is necessary to fork a new JVM. To avoid the slowdown associated with this extra process, you might wan

我正在gradle构建中设置jvm参数,它给了我一个稍微烦人的消息:

Note: in order to honour the org.gradle.jvmargs and/or org.gradle.java.home values specified for this build, it is necessary to fork a new JVM.
To avoid the slowdown associated with this extra process, you might want to consider running Gradle with the daemon enabled.
Please see the user guide chapter on the daemon at /Users/gus/tools/gradle-1.4/docs/userguide/gradle_daemon.html.
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
因此,为了让消息消失,我尝试了
gradle--daemon
。然后我被一船看起来像这样的垃圾邮件击中:(小摘录)


它比原来的消息快了3秒,但这比原来的消息要烦人得多!如何删除原始消息或所有日志输出,使输出恢复正常?

我看不到任何此类输出。我已经使用属性文件方法启用了守护进程,也许这就是为什么

~/.gradle/gradle.properties:

org.gradle.daemon=true

如果您决定某个特定执行应该忽略它,则始终可以使用
gradle--no daemon

实际上,添加daemon方法与以下操作系统类似。对于以下每个操作系统,在以下目录中创建一个名为“gradle.properties”的文件:

  • /home/username/.gradle/(Linux)
  • /Users/username/.gradle/(Mac)
  • C:\Users\username\.gradle\(Windows)
将此行添加到文件中:

org.gradle.daemon=true


奇怪但真实。在属性文件中设置它就成功了。显然,传入命令行标志会打开疯狂日志记录。做梦也没想到这会有关系。看起来像是一个bug或是一个不合适的特性。谢谢
org.gradle.daemon=true