Updated guidance for module JARs in IntelliJ based IDEs

When building an IntelliJ based IDE, we’ve historically packed class files from implementation modules into a single big JAR. For example, for IntelliJ IDEA Ultimate this was idea.jar. However most of the classes in that JAR were IntelliJ Platform classes which are included in all IntelliJ-based IDEs. In IntelliJ IDEA 2018.1 we extracted such common classes to a separate platform-impl.jar file. Similarly, we extracted common platform API classes from openapi.jar to  platform-api.jar. This can help to decrease build and startup time for the IDE, and also makes layout of different IDEs more consistent.

Now we’re recommending that you do the same for your own IntelliJ-based IDEs. The change is rather simple, when listing the modules using the ProductModulesLayout class, you should now list only your product specific API and implementation modules, using the new  productApiModules and productImplementationModules properties (note the prefix is product!).

The platfromApiModules and platformImplementationModules properties you would have been using previously are now deprecated, and should be left unassigned, in which case the default behaviour is to pack the modules listed in CommunityRepositoryModules#PLATFORM_API_MODULES into platform-api.jar, and CommunityRepositoryModules#PLATFORM_IMPLEMENTATION_MODULES into platform-imp.jar. You can read more details in the javadocs for ProductModulesLayout.

You can see how straightforward the change is by taking a look at how it was done for PyCharm Edu in this commit.

 

This entry was posted in IntelliJ Platform and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *