Alternative to POST to separate projects via trigger token?

My apologies to all if this is trivial or in the wrong “topic”.

Let’s say I have a single project, “my-common-code”, that is consumed by multiple downstream projects. Currently, within this project’s gitlab-ci.yml, I include multiple issuances of "- curl -X POST ", one for each of the dependent, downstream projects. This presents something of a problem.

Is there a conventional approach to instead, have each downstream project “register/listen” for an update to “my-common-code” and initiate a rebuild accordingly? As we move more quickly within our development process, I would like the common code project to NOT have to be aware of which projects are dependent upon it.

Rather, I would like to devise something of a “tell all watchers of this project that a change has occurred”. I’m hopeful I have missed the mechanism within gitlab, so that I don’t have to do it via an external script.

Suggestions appreciated.

I’ve considered a post-receive server-side hook, but that would mean the backing script would need to iterate over all projects within the repository and consult each gradle file to determine if it depends on my-common-code. Gitlab has so many conveniences built in, I feel like there has to be a better way - a way I’m failing to see/understand.

Thanks. Cheers!