This means you should always check the root build file when discovering how a particular subproject is being configured.Īnother thing to bear in mind is that the build files might not be called adle. It can also be used to configure individual subprojects when it is preferable to have all the configuration in one place. The root adle is often used to share common configuration between the child projects, for example by applying the same sets of plugins and dependencies to all the child projects. However, multiproject does have one for the root project. There is no build file in the corresponding directory. In the above example, the services project is just a container or grouping of other subprojects. You can configure the root project name by setting rootProject.name.Įach project will usually have its own build file, but that’s not necessarily the case. For that reason, it’s recommended that you always set the root project name to something predictable, even in single project builds. On Continuous Integration servers, like Jenkins, the directory name may be auto-generated and not match the name in your VCS. This usually doesn’t cause problems since all developers check out the same directory name when working on a project. For example, you can find webservice in /services/webservice.īy default, Gradle uses the name of the directory it finds the adle as the name of the root project. These map to the directory structure, so it’s easy to find them. The services project then has its own children, shared and webservice. This tells you that multiproject has three immediate child projects: api, services and shared.
To see a list of the tasks of a project, run gradle :tasksįor example, try running gradle :api:tasks Output of gradle -q projects > gradle -q projects
Customizing Dependency Resolution Behavior.