From 9ae1af4112a9419d7a28d524197d237d4f1c196e Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 14 Sep 2016 20:02:16 +0300 Subject: [PATCH] build scripts: javadoc updated --- .../org/jetbrains/intellij/build/package.html | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/build/groovy/org/jetbrains/intellij/build/package.html b/build/groovy/org/jetbrains/intellij/build/package.html index 4c84e930c9f3..b206b0cd7291 100644 --- a/build/groovy/org/jetbrains/intellij/build/package.html +++ b/build/groovy/org/jetbrains/intellij/build/package.html @@ -1,7 +1,7 @@ -This package contains groovy scripts which build distributions of a product based on IntelliJ Platform. +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. dist.gant to build IDEA Community). It makes sense to add {@linkplain org.jetbrains.intellij.build.BuildOptions#USE_COMPILED_CLASSES_PROPERTY '-Dintellij.build.use.compiled.classes=true'} to 'VM Options' @@ -11,23 +11,30 @@ If you want to build a product from sources locally, run the corresponding *.gan

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 include into all products + 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, add its layout to {@link org.jetbrains.intellij.build.ProductProperties#allPlugins productProperties.allPlugins} list - (see {@link org.jetbrains.intellij.build.impl.PluginLayout#plugin PluginLayout.create} for details) and specify the main plugin module - in {@link org.jetbrains.intellij.build.ProductModulesLayout#bundledPluginModules productProperties.productLayout.bundledPluginModules} 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. -
  3. a groovy script which creates a {@link org.jetbrains.intellij.build.BuildContext BuildContext} instance and calls {@link - org.jetbrains.intellij.build.BuildTasks#compileModulesAndBuildDistributions BuildTasks#compileModulesAndBuildDistributions} method
  4. -
  5. a gant file which adds the folder containing the created groovy classes to the classpath using {@link org.jetbrains.intellij.build.impl.BuildUtils#addToClassPath BuildUtils.addToClassPath} - method and run the groovy script via reflection.
  6. +
  7. a gant file which calls {@link org.jetbrains.intellij.build.BuildTasks#buildProduct BuildTasks.buildProduct} method