Gradle - list tasks for a subproject
Asked Answered
L

1

5

I know I can use gradle tasks to list the tasks for a root project. I inherited a massive project with dozens of subprojects 4-5 levels deep. Many of the tasks are created dynamically.

How can I list tasks available for a particular subproject?

Leninist answered 20/10, 2020 at 7:8 Comment(0)
C
6

Consider this working example.

It has several subprojects, including system:foo, which generates spoof tasks for a list of browsers. Note this command-line:

gradle system:foo:tasks --all

which will list:

[snip]
Other tasks
-----------
fooDownloadDriver_chrome - desc for fooDownloadDriver_chrome
fooDownloadDriver_firefox - desc for fooDownloadDriver_firefox
fooDownloadDriver_safari - desc for fooDownloadDriver_safari
fooGo - desc for fooGo
ijk:ijkGo - desc for ijkGo

p.s. The example was tested with Gradle 6.3 and Gradle 5.6.1

Crankshaft answered 20/10, 2020 at 11:20 Comment(1)
Ah! The --all switch was helpful hereLeninist

© 2022 - 2024 — McMap. All rights reserved.