Gradle 7.x 找不到匹配的 groovy-all:4.0.1 版本

Gradle 7.x cannot find matching groovy-all:4.0.1 version

我想包含 groovy-all 依赖项:

testImplementation "org.apache.groovy:groovy-all:4.0.1"

不过好像https://repo1.maven.org/maven2/org/apache/groovy/groovy-all/4.0.1/groovy-all-4.0.1.module 没有声明需要的属性:

No matching variant of org.apache.groovy:groovy-all:4.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.3.3' but:
          - Variant 'apiElements' capability org.apache.groovy:groovy-all:4.0.1:
              - Incompatible because this component declares an API of a platform and the consumer needed a runtime of a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'enforcedApiElements' capability org.apache.groovy:groovy-all-derived-enforced-platform:4.0.1:
              - Incompatible because this component declares an API of an enforced platform and the consumer needed a runtime of a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'enforcedRuntimeElements' capability org.apache.groovy:groovy-all-derived-enforced-platform:4.0.1 declares a runtime of a component:
              - Incompatible because this component declares an enforced platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'groovydocElements' capability org.apache.groovy:groovy-all:4.0.1 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'javadocElements' capability org.apache.groovy:groovy-all:4.0.1 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'runtimeElements' capability org.apache.groovy:groovy-all:4.0.1 declares a runtime of a component:
              - Incompatible because this component declares a platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'sourcesElements' capability org.apache.groovy:groovy-all:4.0.1 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')

是 groovy 发布过程的问题,还是我做错了什么?

看起来 -all 依赖关系类似于 pom 所以我需要使用 platform:

testImplementation platform("org.apache.groovy:groovy-all:4.0.1")