首页 > 解决方案 > intellij中模块的Gradle依赖关系

问题描述

我在 intellij 项目中有 2 个模块。一个 intellij 插件模块,另一个是 gradle 模块。我需要从 gradle 模块中调用插件模块的一个类。我确实通过以下路径添加了模块的依赖项:项目结构->模块->模块依赖项。但它没有解决。我还在以下代码中添加了以下代码:

设置.gradle

include ':Change',':module'

构建.gradle

dependencies{
  compile project (:Change)
}

这里的“更改”是 intellij 插件模块的名称。

每次我尝试构建 gradle 时都会抛出以下错误:

Could not determine the dependencies of task ':distTar'.
 Could not resolve all task dependencies for configuration ':runtimeClasspath'.
> Could not resolve project :ChangeImpactAnalysis.
Required by:
project :
> Unable to find a matching configuration of project :ChangeImpactAnalysis: None of the consumable configurations have attributes.

请帮忙

标签: gradleintellij-ideamoduledependencies

解决方案


推荐阅读