[flagged]
If you're not simultaneously updating the code and all it's references (i.e. a monorepo), you will need a version dependency graph system (with integrated with your build system). I'm yet to encounter one such tool that isn't awful to use[1]: monorepos are an improvement when you grow beyond a couple dozen repos. Git submodules aren't a good solution either. If you familiar with a decent tool/workflow that is not "institutionally blind", I'd love to learn more about it.
1. Gradle, Android's "repo", home-grown git-submodule-based build systems.