How to build and run plugins from intellij-plugin repository?
Answered
I am trying to run IntelliJ Community edition with the open source plugins from https://github.com/JetBrains/intellij-plugins
I would like to change an existing plugin (cucumber-java) from the intellij-plugins repo to test something out.
How can I connect the intellij-plugins repository with the intellij-community project so that building and running the IDE would include the plugins and pick up my changes to one of them?
I've tried including the cucumber-java project in modules.iml file, followed https://github.com/JetBrains/intellij-community/blob/master/platform/build-scripts/groovy/org/jetbrains/intellij/build/package.html and added the following
List<String> bundledPluginModules = ["intellij.cucumber.java"]
Please sign in to leave a comment.
Seems like I found the missing pieces, final solution:
1) Get IntelliJ Community Edition to build and run (follow https://github.com/JetBrains/intellij-community/blob/master/README.md)
2) Clone https://github.com/JetBrains/intellij-plugins
3) Copy the folder of the plugin you want to change into intellij-community/plugins (or any other path, configured in step 4)
4) Register the .iml file in modules.iml to make the IDE recognise the folder as source files, e.g.
5) In case the plugin depends on other projects, repeat steps 3-4 also with those other projects
6) Register the plugin as dependency to the main project, edit intellij.idea.community.main.iml to add e.g.
7) Register the plugin to be bundled, following https://github.com/JetBrains/intellij-community/blob/master/platform/build-scripts/groovy/org/jetbrains/intellij/build/package.html
at the time of writing, edit the bundledPluginModules in ProductModulesLayout.groovy e.g:
Would be interested to know if any of the steps is too much or I should still add something?
You could create a local standalone project (Gradle or Devkit) for Cucumber plugin and deploy the locally modified version into a standard IJ Instance running from sandbox. Though your approach enables you to test with additional changes in platform or other dependent plugins at the same time.
I'm trying to use a modified version of the dart plugin in my local installation. The steps you listed are (at least now) also mentioned in the proejct's readme, but that only lets me run a sandboxed community IDE. Did you find a way to build a standalone .zip file for manual installation?
See https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#building-distribution