3

I am desperately trying to build only submodules of a gradle module. This is my current struture:

root
|_ foo
   |_egg
   |_nogg
|_ bar
   |_celona

When I run

gradle :foo:egg:build

It builds the submodule. I want it to build all two submodules egg and nogg

I tried:

gradle :foo:build

But it only build foo (which has no sources)

gradle :foo:*:build

Is what I expected to do or

gradle :foo::build

However no luck in getting it to work. Any ideas? The documentation is not giving out a hint for the multiproject part.

xetra11
  • 7,671
  • 14
  • 84
  • 159
  • Except for navigating to the `foo` folder and running `gradle build` from there, I am not aware of any way to do that from the cli. However, if you want, you can make the `foo` project depend on its children. – Bjørn Vester Feb 18 '20 at 15:07

1 Answers1

2

You could execute all foo sub-project tasks by specifying full path to each task:

gradle :foo:egg:build :foo:nogg:build

Gradle accepts multiple tasks in command line parameters.

Valts Mazurs
  • 81
  • 1
  • 3