Gradle Exec - 如何记录命令行?
我正在使用 Gradle 来构建我的项目。 构建文件包含多个 Exec 任务运行外部程序(shell 脚本和 Java Packager)。构建并不总是成功,我想找出原因。分析我得到的所有输出,我感觉很奇怪,Gradle 没有打印正在调用的命令。
如何让 Gradle 在开始执行之前打印命令行?
I am using Gradle to build my project.
The build file contains several Exec tasks to run external programs (shell scripts and the Java Packager). The build is not always successful and I want to find out why. Analyzing all the output I have it feels strange that Gradle does not print the command that is getting invoked.
How can I make Gradle print the commandline before it starts executing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每当您调用gradle命令时,您都可以使用gradle的日志级别,
您都可以喜欢以下
参考: https://docs.gradle.org/current/userguide/command_ine_interface.html#sec:command_line_logging
“ nofollow noreferrer”> html#sec:command_line_debugging
You can use log levels of gradle
whenever you invoke gradle command you can do like this
Ref: https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_logging
https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_debugging
如果您希望在命令失败时始终看到错误:
In case you want to always see the error when the command fails: