Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-878

missing newline character when text is written to stderr

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: 0.9
  • Fix Version/s: 0.9-rc-1

Description

There's a missing newline character between the current task name and the text written to stderr.

Activity

  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
Hide
Permalink
Rodion Moiseev added a comment - 14/Jun/12 3:43 AM

Still reproducible in version 1.0. New lines appear correct in the terminal, but do not work when redirecting.

Here's sample output:

$ gradle build 2>&1 | tee gradle.out

...
:logformat:compileJava/home/rodion/workspace/logstx/logformat/src/main/java/com/logstorage/logformat/dag/LogformatConverter.java:92: warning: [unchecked] unchecked cast
                for (Element e2 : ((List<Element>) e.getChildren("action"))) {
                                                                ^
  required: List<Element>
  found:    List
...

The above output appears in the console (piped through tee) and in the resulting gradle.out file, in identical manner.

This has an unfortunate effect on Gradle-based plugins (e.g. Jenkins, see JENKINS-12234 for a screenshot).

Gradle -version output:

$ gradle -version

------------------------------------------------------------
Gradle 1.0
------------------------------------------------------------

Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0_03 (Oracle Corporation 22.1-b02)
OS: Linux 2.6.32-220.17.1.el6.i686 i386
Show
Rodion Moiseev added a comment - 14/Jun/12 3:43 AM Still reproducible in version 1.0. New lines appear correct in the terminal, but do not work when redirecting. Here's sample output:
$ gradle build 2>&1 | tee gradle.out

...
:logformat:compileJava/home/rodion/workspace/logstx/logformat/src/main/java/com/logstorage/logformat/dag/LogformatConverter.java:92: warning: [unchecked] unchecked cast
                for (Element e2 : ((List<Element>) e.getChildren("action"))) {
                                                                ^
  required: List<Element>
  found:    List
...
The above output appears in the console (piped through tee) and in the resulting gradle.out file, in identical manner. This has an unfortunate effect on Gradle-based plugins (e.g. Jenkins, see JENKINS-12234 for a screenshot). Gradle -version output:
$ gradle -version

------------------------------------------------------------
Gradle 1.0
------------------------------------------------------------

Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0_03 (Oracle Corporation 22.1-b02)
OS: Linux 2.6.32-220.17.1.el6.i686 i386

People

  • Assignee:
    Adam Murdoch
    Reporter:
    Adam Murdoch
Vote (0)
Watch (1)

Dates

  • Created:
    26/Mar/10 1:40 AM
    Updated:
    04/Jan/13 5:10 AM
    Resolved:
    24/Nov/10 2:27 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.