Search code examples
javagradleintellij-idea

How to deal with "Failed to apply plugin 'org.jetbrains.intellij'. Gradle IntelliJ Plugin requires Gradle X.X and higher" error


My plugin is based on official Jet Brains template, however Java one, not Kotlin.

When I opened my project, I got the error

An exception occurred applying plugin request [id: 'org.jetbrains.intellij', version: '1.12.0'] Failed to apply plugin 'org.jetbrains.intellij'. Gradle IntelliJ Plugin requires Gradle 7.3 and higher

The dependencies in build.gradle.kts are

plugins {
    // Java support
    id("java")
    // Kotlin support
    id("org.jetbrains.kotlin.jvm") version "1.7.10"
    // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
    id("org.jetbrains.intellij") version "1.12.0"
    // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
    id("org.jetbrains.changelog") version "1.3.0"
    // detekt linter - read more: https://detekt.github.io/detekt/gradle.html
    id("io.gitlab.arturbosch.detekt") version "1.17.1"
    // ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
    id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
}

Would you please no teach me how to deal with this error? I understand that I need to update the Grade, however how to do it with IntelliJ IDEA for current project?

My Project configuration is:

enter image description here

enter image description here


Solution

  • An exception occurred applying plugin request [id: 'org.jetbrains.intellij', version: '1.12.0'] Failed to apply plugin 'org.jetbrains.intellij'. Gradle IntelliJ Plugin requires Gradle 7.3 and higher

    Please open the gradle/wrapper/gradle-wrapper.properties, and check what version is there. You could change the old Gradle version to any version new than 7.3 in that file's distributionUrl part to fix this problem and click the Gradle reload button to reload this project.

    Or run something like gradle wrapper --gradle-version 8.0 from the command line to update the Gradle version.