Closed entonio closed 5 years ago
stderr is red, while stdout is black. I'm guessing that whatever you are using to print in the logs changes behaviour with the Gradle version. That is, it prints to stderr in older version, while it prints to stdout now.
My setup is simply:
String a = new Object();
And the colours in NB's Output
pane, which I have with the standard settings, seem to be:
Does nobody else have this issue?
(I mean standard javac errors, though it applies to all. Could gradle have started printing javac errors to stderr?)
If you were to explicity write something to System.out
and System.err
, how would it display?
from the build script of course.
Adding System.err.println("Test stderr")
in the main body of build.gradle
:
Here is a sample project, one just the project, and the other with the files added by the process: Colours.zip Colours+.gradle.zip
It seems this is an issue in Gradle and was already fixed in Gradle 5.1. I have checked it, and it does indeed seems to be fixed in Gradle 5.1. See the logic in bf5a22ec60f1091fd255c494b7804a6135da1853.
You're correct. I apologise for having brought it up here. I had originally tested it with 5.1.1 and was convinced the problem was there as well. I must have become confused in the middle of all the NB + java + plugin + grade juggling.
I have reverted to NB 8.2 on Java 8 + this 1.4.x using Java 8 + Gradle 4.6
because
NB 10 on Java 11 + this 2.0.x using Java 8 + Gradle 4.8+
seems to use a lot more CPU and be slower (I have to use Java 8 for compilation because the CheckerFramework only supports Java 8 as of yet).
In my projects, if I specify Gradle 4.8 or higher in NB's Preferences as the version to use, the build output in the console is black where red is expected.