intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Specify installed plugins for runIde task

Open hfhbd opened this issue 2 years ago • 2 comments

Describe the need of your request

When I use runIde to test my plugin, I often need PsiViewer to validate my psi tree or to check the implemented ElementPattern in my IntelliJ plugin, like CompletionContributor.extend. At the moment I have to run runIde, wait for the IDE, go to plugins, and install the PsiViewer by myself.

Proposed solution

Add a Gradle property that downloads specified plugins and installs the plugins automatically.

Alternatives you've considered

No response

Additional context

No response

hfhbd avatar Nov 11 '23 09:11 hfhbd

Trust me, this is a feature that already exists. https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin-faq.html#how-to-add-a-dependency-on-a-plugin-available-in-the-file-system https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-plugins

meiMingle avatar Nov 14 '23 07:11 meiMingle

I only want to specify preinstalled plugins for development, so the runIde task. I don' t want to depend on other plugins in production.

hfhbd avatar Nov 14 '23 16:11 hfhbd

Since IntelliJ Platform Gradle Plugin 2.0.0, it's possible to define custom test tasks and disable bundled plugins:

val customRunIde by intellijPlatformTesting.runIde.registering {
    type = IntelliJPlatformType.Rider
    version = "2024.2"

    plugins {
        plugin("pluginId:version")
        plugin(pluginId, version, channel)
        disablePlugins(bundledPlugiId)
    }
}

val customTest by intellijPlatformTesting.testIde.registering {
    ...
}

hsz avatar Jul 04 '24 14:07 hsz