Cannot find builtin plugin 'java' for IDE:
Answered
I'm getting this error, I want to create an IntelliJ plugin. Where am I going wrong ?
org.gradle.tooling.BuildException: Cannot find builtin plugin 'java' for IDE: /Users/furkanozmen/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2021.3/75777e10a0e2880bc02945066dda2480a696c3d9/ideaIC-2021.3
build gradle
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.9.25"
id("org.jetbrains.intellij") version "1.17.4"
}
group = "com.modulith"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect"))
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version.set("2021.3")
version.set("2021.3")
type.set("IC")
plugins.set(listOf("java"))
}
tasks {
buildSearchableOptions {
enabled = false
}
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "16"
kotlinOptions.languageVersion = "1.6"
kotlinOptions.apiVersion = "1.6"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "16"
kotlinOptions.languageVersion = "1.6"
kotlinOptions.apiVersion = "1.6"
}
}
dependencies {
testImplementation("org.assertj:assertj-core:3.21.0")
testImplementation("junit:junit:4.13.2")
}
tasks.publishPlugin {
val intellijPublishToken: String? by project
token.set(intellijPublishToken)
}
tasks {
runPluginVerifier {
ideVersions.set(listOf("2020.2.4", "2020.3.4", "2021.1.1", "2021.3"))
}
}
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<!-- Unique identifier of the plugin. It should be FQN. It cannot be changed between the plugin versions. -->
<id>com.modulith.modulith-navigator</id>
<!-- Public plugin name should be written in Title Case.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-name -->
<name>Modulith-navigator</name>
<!-- A displayed Vendor name or Organization ID displayed on the Plugins Page. -->
<vendor email="support@yourcompany.com" url="https://www.yourcompany.com">YourCompany</vendor>
<!-- Description of the plugin displayed on the Plugin Page and IDE Plugin Manager.
Simple HTML elements (text formatting, paragraphs, and lists) can be added inside of <![CDATA[ ]]> tag.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
<description><![CDATA[
Enter short description for your plugin here.<br>
<em>most HTML tags may be used</em>
]]></description>
<!-- Product and plugin compatibility requirements.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<!-- Extension points defined by the plugin.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
<extensions defaultExtensionNs="com.intellij">
<codeInsight.lineMarkerProvider
language="java"
implementationClass="com.modulith.modulithnavigator.HandlerNavigationMarkerProvider"/>
</extensions>
</idea-plugin>
Please sign in to leave a comment.
Hi,
The correct Java plugin ID is org.intellij.java. See https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#ids-of-bundled-plugins.
Also, it is recommended to migrate to IntelliJ Platform Gradle Plugin 2.x. See https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html.