11

I am getting a very uninformative error when I try to build my project after migrating from Gradle Groovy DSL to Kotlin DSL in IntelliJ IDEA.

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.

I'm using the gradle 5.0 wrapper so updating is not an option as far as I know.

I'm also on the latest version of IntelliJ with all plugins up to date.

IntelliJ IDEA 2018.3 (Ultimate Edition) Build #IU-183.4284.148, built on November 21, 2018

The project I'm building with Gradle is a multi module Kotlin-JVM project.

zjuhasz
  • 1,489
  • 12
  • 30
  • You may have to roll back to Gradle 4. `IdeaModuleDependency. getDependencyModule()` has been removed in Gradle 5. – Hendra Anggrian Dec 10 '18 at 06:18
  • @HendraAnggrian but what is using `IdeaModuleDependency.getDependencyModule()`? It's not in any of my build scripts and as far as I can tell most people aren't having this issue. – zjuhasz Dec 11 '18 at 19:10
  • Is there any way to tell where it is being called? – zjuhasz Dec 11 '18 at 19:19
  • 3
    `IdeaModuleDependency` is bundled within gradle api, you may not use them, but at least one gradle plugins you're using may be dependant on it. Android gradle plugin is an example, you will have to wait until they release a version that is built upon Gradle 5. – Hendra Anggrian Dec 14 '18 at 05:20
  • 1
    Related issue: https://youtrack.jetbrains.com/issue/KT-29127 – Alexey Belkov Jan 09 '19 at 15:56

0 Answers0