IntelliJ Plugin fails at loading dependencies from gradle project

32 views Asked by At

I am developing an IntelliJ Plugin. Currently i want to load all dependencies from the Gradle Project i am inspecting.

Therefore I use this method:

ExternalSystemUtil.refreshProjects(new ImportSpecBuilder(project, GradleConstants.SYSTEM_ID));

Which results in an error:

... requires plugin 'org.jetbrains.plugins.gradle' to be installed

So i see the problem is, a plugin is missing.

In my plugin.xml I altough have:

<depends>org.jetbrains.plugins.gradle</depends>

and in my build.gradle.kts:

plugins {
    id("java")
    id("org.jetbrains.kotlin.jvm") version "1.8.22"
    id("org.jetbrains.intellij") version "1.15.0"
}

...

intellij {
    version.set("2023.1.3")
    type.set("IC") // Target IDE Platform

    plugins.set(listOf("java", "com.intellij.java", "org.jetbrains.plugins.gradle"))
}

I don't see where the problem comes from. I am running the plugin in a headless mode. Here is a link to my my project: https://github.com/NilsBaumgartner1994/REDCLIFF-Java

I tried importing it like in: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#usage

plugins {
  id("org.jetbrains.intellij") version "1.15.0"
}
0

There are 0 answers