Shared buildSrc across multiple apps

I have multiple apps, which use same modules. Each app has in main app module buildSrc directory, where are all versions of libraries, which is great and simple and all modules are using same APIs. But is it possible to make it global for all apps? It’s pain to maintain and with more apps coming it will be even worse.

My current project structure

  • App1
    • app/
    • buildSrc/src/main/java/Dependencies.kt
    • buildSrc/build.gradle.kts
    • build.gradle
    • settings.gradle (here are all modules imported)
  • Modules/* - Here are all modules, all of them has build.gradle, which uses some dependencies
  • App2 - same structure as App1
  • App3 - same structure as App1

You could create a plugin which you publish to a repository and apply to your relevant projects