【发布时间】:2016-06-17 19:37:40
【问题描述】:
如何让 gradle project.exec 或 Exec 任务不显示有关命令行的所有信息?
代码
project.exec {
workingDir = exeDir.absolutePath
executable = starter.absolutePath
args = commandLine.split().toList()
environment << envVars
project.logging.captureStandardOutput LogLevel.INFO
standardOutput = outputStream
errorOutput = outputStream
}
输出
Starting process 'command 'regexIdentifier''. Working directory:
/home/code/ Command: /home/code/bin/regexIdentifier server username
password ...
Successfully started process 'command '/home/code/bin/regexIdentifier''
我需要通过 gradle Exec 任务执行带有密码的 cmd,并且希望 gradle 在执行时不显示命令行
【问题讨论】:
标签: gradle