Some languages, like Clojure, support having more than one src directory out of the box, or support including "projects" as in the example above, while other languages may need a plugin, like the build-helper-maven-plugin.
It's almost like magic, because all we have to do is to list all our building blocks used in e.g. a service, and everything will automatically "connect" without the need of dependency injection, annotations or any other "magic"! Here is how that looks like in the User Manager example app.
This is also why the Polylith architecture can be used without tooling support and still give us most of its benefits.