Multiline task description

In my custom plugin, I have the following multi-line description for a custom task:

project.tasks.register("myTask", {
description = """Performs myTask with perfection.

To use the new flux capacitor, use -Pflux=new."""})

When this is rendered in calling gradle tasks, it prints the multiline which is annoying. Is there a way to provide a task summary (one line for gradle tasks) and a task description (multi-line for gradle help --task myTask)?

Sounds like you should open a feature request to either normalize \s++ into one space for tasks, or for being able to specify separate properties.

From a quick look both simply use the description without any condition.

Anything you could do would be extremely hacky, like overriding getDescription and checking the call-stack where the call is made from. :smiley:

Or… when tasks is called, only print the first line of the description (until the first of line character)?

It until the first blank line like with Git commit messages. :man_shrugging: