Gradle Task Gutter Icons do not exist for registered tasks ie tasks.register('taskName')

已回答

Gradle Task Gutter Icons do not exist for registered tasks ie tasks.register('taskName') 

We would like to speed up our build and registering our tasks will allow them to have lazy configuration.

However the gutter icons do not appear so we can no longer run or debug a task from the gutter icon.

Can anyone suggest a fix for this

IntelliJ IDEA 2022.2.3 (Ultimate Edition), Build #IU-222.4345.14, built on October 5, 2022

评论操作 固定链接

How do you use tasks in a script exactly where you expect to see a run gutter icons? Please provide an isolated sample code.

Note that all the tasks are displayed in a Gradle tool window for the project.

Thanks.

0
评论操作 固定链接

I think there is a disconnect.  I believe you are thinking about the Gradle side bar.

I am referring to the editor window that contains the run icons in the gutter by the line number.

These Do Not appear when the task is set for lazy configuration via the tasks.register('taskName') convention.

 

0
评论操作 固定链接

I understand you are talking about the Gutter (the side bar). I just mentioned that Gradle tool window may be used to invoke such tasks as a workaround.

Can you give an example of such a task, please? Thanks.

 

0
评论操作 固定链接

I see this too for any (as far as I can tell) task that I convert to tasks.register().

For example, some trivial tasks:

 

Like mentioned, it is still absolutely possible to run the task via the Gradle tool window (or "Run Anything" window), but it is really nice to have the gutter icon for when you are working directly with the task and want to kick it off right there.

In this same example, I can also press ctrl+shift+F10 while in my cursor is in "myTask" to run it. Trying the same thing in "myTask2" instead just runs "gradle".

0
评论操作 固定链接

Thank you for the information. Please vote for this request in our tracker: IDEA-315327 Gradle Task Gutter Icons do not exist for registered tasks ie tasks.register('taskName')

Please note that you also can use Run Anything popup to run gradle tasks:

1

请先登录再写评论。