Javadoc task name is printing errors where UP-TO-DATE should be

A little background, the Jenkins Gradle plugin identifies each task being run, it then bolds it and keeps track it in a “Executed Gradle Tasks” section. It does this in hudson.plugins.gradle.GradleTaskNote by doing some matching on the output, specifically wit this match:

MarkupText.SubText t = text.findToken(Pattern

I’m seeing a problem with the javadoc task, where any issues crop up on the same line as the :javadoc line. For example, here is some Gradle output:

:template-client:processResources UP-TO-DATE
:template-client:jar UP-TO-DATE
:template-client:javadoc/mnt/builds/slave/workspace/OSS-gradle-template-release/template-client/src/main/java/com/netflix/template/common/ warning - @return tag has no arguments.
/mnt/builds/slave/workspace/OSS-gradle-template-release/template-client/src/main/java/com/netflix/template/common/ warning - @return tag has no arguments.
  2 warnings
:template-client:sourcesJar UP-TO-DATE

Those combine to give me an ugly Jenkins UI (and that’s saying a lot, since the Jenkins UI is already bad). I’m not sure where the problem lays, but I think Gradle should be in-charge of the task name line, either printing UP-TO-DATE or not. Maybe the javadoc task is specifically bad in printing while Gradle determines if the task is up-to-date or not. If someone can point me in the direction of where this logic is, I can look further.

Apparently the Javadoc task is not up-to-date and running again. ‘–info’ will tell you why.

The premise here is that this is a fresh checkout, I don’t expect it to be up-to-date, I want it to run. I just expect it’s output to be like other output, on the next line. I believe this to be a bug, and if so, elevated to a JIRA. If you can give hints where the logic which control the outputting of the task name, and “UP-TO-DATE”, I can dig further myself.

Not sure I follow, but have a look at ‘org.gradle.api.internal.tasks.TaskStateInternal’.