How to build IDEA community edition from source?

Answered

Hi,

How can I build IDEA community edition from source code so that my custom plugin will be included in the 'plugin' directory of the IDEA distribution. I want to build the IDEA distributions to Windows (.exe), Linux (.zip) and MacOS (.dmg).

Thanks in Regards.

0
8 comments

Do you develop the plugin in a separate project or you forked intellij-community repository and added the sources of your plugin to its project configuration?

0

I have developed the plugin as a different project. 

0

You can do the following (see javadoc for org.jetbrains.intellij.build package):

  1. Create a groovy class extending org.jetbrains.intellij.build.IdeaCommunityProperties class, override copyAdditionalFiles method and add an instruction which copies the JARs of your plugin to "$targetDirectory/plugins" directory.
  2. Create a gant script which calls BuildTasks.buildProduct method (look at pycharm_community_build.gant for example).

After that you can either call the gant script directory from IDEA or create an Ant file which calls it (look at our build.xml for example).

However this won't produce .dmg file (it can be built on a separate machine under Mac OS) and the produced *.exe files won't be signed. If you want to overcome these problems, you can pass an instance of org.jetbrains.intellij.build.ProprietaryBuildTools implementing these tasks to 'buildProduct' method.

0

Hi Nikolay,

Thank you for the quick response. I will follow the instructions and post if I encounter an issue.

0

Hi, I have build IDEA with my plugin, but when building I'm getting below error

Cannot extract win JRE: no ‘jbrex8…_x64.tar.gz’ file found

Where can I download the specified JRE. Further, how do I sign the the generated .exe files for windows?

Apart from that for macOs build .dmg file is not build and gives below error

A Mac OS build agent isn’t configured, dmg artifact won’t be produced.

How can I fix it?

Thanks in advance

0

Hi Nikolay,

I was able to successfully build the community edition with my custom plugin pre-bundled. Thank you very much for the help. 

0

Hello sajith,

I was wondering if you could possibly take a look at the problem that I'm having with building IJ IDEA on macOS 10.14.4 .   Since it looks like you've successfully built IJ IDEA on macOS, you might be able to help me.  Here's the link to the post:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206824215-Turning-off-CommandLineWrapper?page=1#community_comment_360000445039

 

Any help or suggestions would be greatly and deeply appreciated

.  

0

Please sign in to leave a comment.