title: Specify Gradle version constraints for multiple configurations
body: <p>I have a multi-module Gradle 6.5 project which also includes some test fixtures code. To avoid dependency issues I'd like to set (and maintain) the versions in one place, and just refer to the version-less dependencies in the individual modules:</p>
  
  <pre><code>subprojects {
      apply plugin: 'java'
  
      dependencies {
          implementation 'com.google.guava:guava'
  
          constraints {
              implementation 'com.google.guava:guava:20.0'
              compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
          }
      }
  }
  </code></pre>
  
  <p>Now, if a module includes <code>compilyOnly 'com.google.code.findbugs:jsr305'</code> the version <code>3.0.2</code> is taken based on the constraints above. This works fine if I know the configuration (<code>implementation</code>, <code>compileOnly</code>, ...).</p>
  
  <p>The question now is: How can I specify versions that apply to all configuration? What if a module decides to use JSR305 annotations for test fixtures code? <code>testFixtures 'com.google.code.findbugs:jsr305'</code> fails, as the version is not specified anywhere. I also think it's a bad idea to repeat the version specification for all (possible) configuration:</p>
  
  <pre><code>implementation 'com.google.code.findbugs:jsr305:3.0.2'
  testFixturesImplementation 'com.google.code.findbugs:jsr305:3.0.2'
  compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
  </code></pre>
  
  <p>Is there a shortcut to this?</p>