将项目迁移到Gradle Kotlin DSL时出现不支持的方法:IdeaModuleDependency.getDependencyModule()错误

zju*_*asz 8 intellij-idea gradle kotlin gradle-kotlin-dsl

当我从Intellidle IDEA中的Gradle Groovy DSL迁移到Kotlin DSL后尝试构建项目时,我收到了一个非常无法解释的错误.

Unsupported method: IdeaModuleDependency.getDependencyModule(). The version of Gradle you connect to does not support that method. To resolve the problem you can change/upgrade the target version of Gradle you connect to. Alternatively, you can ignore this exception and read other information from the model.

我正在使用gradle 5.0包装器,因此据我所知,更新不是一个选项.

我也使用最新版本的IntelliJ,所有插件都是最新的.

IntelliJ IDEA 2018.3(终极版)Build#IU-183.4284.148,建于2018年11月21日

我用Gradle构建的项目是一个多模块Kotlin-JVM项目.