我正在使用高级文本构建系统运行Gradle Java构建。我正在使用Linux Mint 19.1。
当我从崇高的文本运行构建命令(gradlew构建)时,输出正在被打乱。从终端运行相同的构建时,输出是预期的。升华后,输出“> Task”的第一个字符消失了,单词“ FAILED”的第一个实例加上后面的换行符向下移动了几行。
在终端机中
> Task :compileJava FAILED
/home/me/mycode/src/main/java/CLIClient.java:4: error: class, interface, or enum expected
sfpublic class CLIClient {
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
1 actionable task: 1 executed
崇高
:compileJava/home/me/mycode/src/main/java/CLIClient.java:4: error: class, interface, or enum expected
sfpublic class CLIClient {
^
1 error
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
1 actionable task: 1 executed
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
我的Sublime构建系统定义如下...
{
"cmd": ["./gradlew" , "build"],
"working_dir": "${project_path}",
"file_regex": "^(/...*?):([0-9]*):?([0-9]*)"
}
答案 0 :(得分:0)
默认情况下,gradle会做一些命令行魔术,在屏幕上显示当前任务的进度。它还显示颜色。我猜这与崇高文字不兼容。
您可以通过在gradle命令行中传递--console=plain
来关闭此功能
我猜这意味着
{
"cmd": ["./gradlew" , "build", "--console=plain"],
"working_dir": "${project_path}",
"file_regex": "^(/...*?):([0-9]*):?([0-9]*)"
}