VeasMKII
VeasMKII

Reputation: 405

How do I build all projects in a sub-project in Gradle?

I've got a multi-build project which is organised like this:-

-root
  -project1
  -project2
  -project3
   --subproject1
   --subproject2

When I call the following:-

gradle project3:build

I only get a single empty jar named project3.jar, how would I instead instruct gradle to build every single sub-project of project3?

Upvotes: 0

Views: 43

Answers (1)

Invisible Arrow
Invisible Arrow

Reputation: 4925

Try the following:

gradle -p project3 build

This will build project3 and all its sub-projects.

The -p switch is used to specify the project directory. More information here.

Upvotes: 1

Related Questions