Looking for current recommendation on using buildSrc vs composite builds

I have multiple Android projects that consume a common set of libraries like this

AndroidAppA
±- library1
±- library2

AndroidAppB
±- library1
±- library2

Each Android App has dependencies declared in the buildsrcipt block

buildscript {
    repositories {
...
    }
    dependencies {
        classpath("com.android.tools.build:gradle:versionXXX")
}
}

I’d like to define a composite build dependency that defines versionXXX for consumption by AndroidAppA, AndroidAppB, library1 and library2

My question:
What is Gradle’s recommended way to do this that is compatible with the Android Gradle Plugin?

There seem to be a few threads on these forums stating that buildSrc will go away to be replaced by composite builds however composite builds don’t seem to work for the case above where they are consumed by the buildsrcipt block