Log missing new line

In some of my Jenkins jobs (using a custom Linux and Gradle 2.2.1) I get the following logs

05:00:11 :compileJava UP-TO-DATE 05:00:11 :processResources UP-TO-DATE 05:00:11 :classes UP-TO-DATE 05:00:11 :jar 05:00:11 :assemble 05:00:19 :compileTestJava/NOSAVE/CODEBUILDING/tc/BuildNodes/xxx/yyy.java:30: cannot find symbol 05:00:19 symbol : method yyy()

A newline is missing after compileTestJava. This is annoying because the real line (with xxx and yyy replaced) is very long and it messes the Jenkins log output page

This also happens with custom tasks, such as

09:31:17 :compileMySourceSetJava/NOSAVE/CODEBUILDING/tc/BuildNodes/xxx/yyy.java:42: warning: unmappable character for encoding ASCII

one workaround might be to add the following snippet to your build:

    tasks.withType(JavaCompile) {
        doFirst { println “\n” }
    }