Could not find method testFixturesImplementation

Apologies if I’m missing something obvious, but I’m updating my project to gradle 6.9.2 and trying to take advantage of testFixtures. The project is organized with multiple subprojects, and I have a top-level build.gradle file with an allProjects declaration as follows (abridged version)

allProjects {
  dependencies {
    ...
    testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
    ...
    testFixturesImplementation 'someImportantLibrary:1.0' // <- This causes a failure
  }
}

When I add testFixturesImplementation dependencies in the allProjects.dependencies, gradle throws a “Could not find method testFixturesImplementation” error. However, if I copy and paste the identical statement into the build.gradle file for a subproject that has testFixtures and put it in a dependency block, it works. I obviously don’t want to have to copy and paste these dependencies to all the various subprojects. Any guidance would be appreciated.

I was missing something obvious. I had added the java-test-fixtures plugin to the subproject’s build.gradle but not the top-level build.gradle.