This package contains groovy scripts which build distributions of products based on IntelliJ Platform.

If you want to build a product from sources locally, run the corresponding *.gant file from IntelliJ IDEA (e.g. idea_community.gant to build IDEA Community). Do not forget to add 'Build Project' step to 'Before Launch' section of the created Run configuration to ensure that changed groovy scripts are copied to the output. It makes sense to add {@linkplain org.jetbrains.intellij.build.BuildOptions#USE_COMPILED_CLASSES_PROPERTY '-Dintellij.build.use.compiled.classes=true'} to 'VM Options' to skip compilation and use the compiled classes from the project output. Also you may use {@linkplain org.jetbrains.intellij.build.BuildOptions#targetOS 'intellij.build.target.os'} system property to build artifacts only for a specific OS, and set {@linkplain org.jetbrains.intellij.build.BuildOptions#buildStepsToSkip 'intellij.build.skip.build.steps'} system property to skip some long build steps (e.g. scrambling). See {@link org.jetbrains.intellij.build.BuildOptions BuildOptions} class for more options.

In order to run a gant script without IntelliJ IDEA you can use build/gant.xml Ant file and pass path to the gant script via gant.script property.

If you want to add a new module to an existing product, add its name to {@link org.jetbrains.intellij.build.ProductModulesLayout#platformApiModules platformApiModules/platformImplementationModules}. If the module is part of IntelliJ Platform and needs to be included into all products add its name to {@link org.jetbrains.intellij.build.CommunityRepositoryModules#PLATFORM_API_MODULES PLATFORM_API_MODULES/PLATFORM_IMPLEMENTATION_MODULES} list.

If you want to add a new plugin to an existing product, specify the main plugin module in {@link org.jetbrains.intellij.build.ProductModulesLayout#bundledPluginModules productProperties.productLayout.bundledPluginModules} list. If the plugin's layout isn't trivial, i.e. it consists of more than one module or bundle some project libraries (see {@link org.jetbrains.intellij.build.impl.PluginLayout#plugin PluginLayout.create} for details) you also need to specify its layout in the corresponding *_REPOSITORY_PLUGINS list ({@link org.jetbrains.intellij.build.CommunityRepositoryModules#COMMUNITY_REPOSITORY_PLUGINS COMMUNITY_REPOSITORY_PLUGINS} for plugins located in idea/community sources).

If you want to add a new library to the platform part of some product(s) you just need to add it to the dependencies list of one of modules included into {@link org.jetbrains.intellij.build.ProductModulesLayout the product layout} with scope 'Compile' or 'Runtime'. If you don't want to add the library to dependencies you may copy it in the implementation of {@link org.jetbrains.intellij.build.ProductProperties#copyAdditionalFiles copyAdditionalFiles} method for all products where it should be.

If you want to add a new library to distribution of some plugin you can either add it as a module library and it'll be bundled automatically or define it as a project library and add to the plugin layout explicitly (see {@link org.jetbrains.intellij.build.impl.PluginLayout#plugin PluginLayout.create} for details)

If you want to build a new product, you need to define the following:

  1. an implementation of {@link org.jetbrains.intellij.build.ProductProperties ProductProperties}, look at {@link org.jetbrains.intellij.build.IdeaCommunityProperties IdeaCommunityProperties} for example.
  2. a gant file which calls {@link org.jetbrains.intellij.build.BuildTasks#buildProduct BuildTasks.buildProduct} method, look at python/build/pycharm_community_build.gant for example