derekv
derekv

Reputation: 3141

In gradle, how can I run a task against all projects recursively from command line?

I'm looking for a syntax along the lines of ./gradlew :all:myTask that I can quickly execute from the command line. I must have missed it in the documentation somewhere.

I know I can modify the build to include a new task that runs a task against all sub-projects, however I'd prefer to not mess with modifying the build for simple one-off scenarios.

Upvotes: 1

Views: 492

Answers (1)

Eric Wendelin
Eric Wendelin

Reputation: 44379

If I understand your goal correctly, running ./gradlew myTask should do what you want by default

:myTask
:foo:myTask
:foo:bar:myTask
:baz:myTask

Upvotes: 1

Related Questions