Slackbot
11/02/2022, 4:57 PMChris Lee
11/02/2022, 4:59 PMThe commandhttps://docs.gradle.org/current/userguide/intro_multi_project_builds.htmlwill execute thegradle test
task in any subprojects, relative to the current working directory, that have that task. If you run the command from the root project directory, you’ll runtest
in api, shared, services:shared and services:webservice. If you run the command from the services project directory, you’ll only execute the task in services:shared and services:webservice.test
Giuseppe Barbieri
11/02/2022, 5:00 PMGiuseppe Barbieri
11/02/2022, 5:05 PMbuild/repo
, it turns out I was looking only in the root, while every module has obviously its own build
Vampire
11/02/2022, 5:20 PM:build
, then only the root projects build
task is executed unless you configured task dependencies manually.
If you run a task without any path (i.e. without it containing a :
separator), then the magic kicks in that runs the task in all projects that have a task with that name.Vampire
11/02/2022, 5:21 PMbuild
task through the IDE tool window, it is equivalent to executing :build
, not build
.Giuseppe Barbieri
11/02/2022, 5:23 PMChris Lee
11/02/2022, 5:25 PMIf you for example trigger the root projectsThis isn’t what is observed. A run configuration is created withtask through the IDE tool window, it is equivalent to executingbuild
, not:build
.build
build
as the target, and all build targets in root and subprojects are executed. At least that is the case in IntelliJ.Vampire
11/02/2022, 5:26 PMChris Lee
11/02/2022, 5:26 PMGiuseppe Barbieri
11/02/2022, 5:27 PMVampire
11/02/2022, 5:29 PM