Sublime Forum

Sublime build scrambles gradle output

#1

I am running a gradle Java build using sublime text build system. I am using Linux Mint 19.1.

When I run the build command (gradlew build) from sublime text, output is is being scrambled. When running the same build from the terminal, the output is as expected. In sublime the first characters of the output “> Task” are gone, and the first instance of the word “FAILED” plus the following newline, are moved a few lines down.

In Terminal

> 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

In Sublime

: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

My Sublime build system is defined as follows…

{
    "cmd": ["./gradlew" , "build" , "--console=plain"],
    "working_dir": "${project_path}",
    "file_regex": "^(/...*?):([0-9]*):?([0-9]*)"
}
0 Likes

#2

When running on the command line do parts of the output get written to stderr? You can check this by running ./gradlew build --console=plain 2>&1 >/dev/null and seeing whether you get the same output.

0 Likes