首页 > 解决方案 > Gradle 项目声明了从配置“detachedConfiguration1”到配置“默认”的依赖关系

问题描述

我有一个 gradle 项目https://gist.github.com/iva-nova-e-katerina/f5428f52afa36c5f2719d047ccc53213并使用“./gradlew build”运行它,但出现以下错误:

└─$ ./gradlew build
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Parallel execution is an incubating feature.

> Configure project :
ArtifactoryUser user: null
Using Java from /home/katya/java (version 11.0.2)
Detected development environment
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)

FAILURE: Build failed with an exception.

* Where:
Script '/home/katya/tmp_work/groovy/gradle/binarycompatibility.gradle' line: 67

* What went wrong:
Could not determine the dependencies of task ':groovy-console:japicmp'.
> Could not resolve all files for configuration ':groovy-console:detachedConfiguration1'.
   > Could not resolve org.codehaus.groovy:groovy-console:2.4.16.
     Required by:
         project :groovy-console
      > Project :groovy-console declares a dependency from configuration 'detachedConfiguration1' to configuration 'default' which is not declared in the descriptor for project :groovy-console.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

你能解释一下发生了什么吗?什么是“detachedConfiguratoin1”以及如何解决此错误?

标签: gradle

解决方案


推荐阅读