Parallel Projects and Plugins

I’m building a project that is not a multi-project build but has some of the features of such a build. I would like to use some of the same plugins in each project but must exclude them from a couple of the projects due to resolution problems. Here is the structure of my projects and the plugin definitions:

A: Depends on B
plugins{
id ‘org.asciidoctor.convert’ version “{asciiDoctorVersion}" id "com.github.spotbugs" version "{spotBugsVersion}” apply false
id ‘net.thauvin.erik.gradle.semver’ version “${semverVersion}”
id ‘maven-publish’
id ‘groovy’
}
B: I used a buildscript block to set the plugins since this project also needs to be built independently of A

buildscript {
repositories {
maven {
url “https://plugins.gradle.org/m2/
}
}
dependencies {
classpath (
“net.thauvin.erik.gradle:semver:{semverVersion}", "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:{spotBugsVersion}”,
“org.asciidoctor:asciidoctor-gradle-plugin:${asciiDoctorVersion}”
)
}
}

plugins{
id ‘maven-publish’
id ‘java-library’
}
apply plugin: ‘net.thauvin.erik.gradle.semver’
apply plugin: “com.github.spotbugs”
apply plugin: ‘org.asciidoctor.convert’

C: This is a parallel project that needs to be built independently but depends on A and B. I tried using a Buildscript ad/or declaring the plugins using the block. etc… but can’t resolve the plugins so I’ve commented them out

plugins{

//id ‘org.asciidoctor.convert’ version “${asciiDoctorVersion}” apply false

//id “com.github.spotbugs” version “${spotBugsVersion}” apply false

//id ‘net.thauvin.erik.gradle.semver’ version “${semverVersion}” apply false

id ‘com.github.johnrengelman.shadow’ version “${shadowVersion}”

id ‘maven-publish’

id ‘java-library’

id ‘application’

}
Any ideas of how I can use the plugins in this project while still depending on A and B?

Sorry , some of the plugin definitions got cut off, but the info should still suffice

Found that the solution was to use a Buildscript{} in every build.gradle file. It’s not the current recommended way of defining plugins that my project uses but it works