From 52fda5e2ab24a0fe0b2b7669b385efea1789a2c5 Mon Sep 17 00:00:00 2001 From: Egor Malyshev Date: Tue, 13 May 2025 16:49:50 +0200 Subject: [PATCH] Re-applying patch suggested earlier for 251 (cherry picked from commit 181c67fc4a7193511e0336d2695d75625f7f534a) (cherry picked from commit a027d1cf1ee2d8a33eed4fd1b558f3dddbc21cea) IJ-MR-166587 GitOrigin-RevId: b824db72fe831a714ebcb2cbf08a3a42e1bcedf5 --- .../intellij/build/impl/BuiltInHelpPlugin.kt | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuiltInHelpPlugin.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuiltInHelpPlugin.kt index fd86db5e7ebd..576886869f35 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuiltInHelpPlugin.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuiltInHelpPlugin.kt @@ -26,12 +26,11 @@ internal fun buildHelpPlugin(pluginVersion: String, context: BuildContext): Plug return null } - return PluginLayout.plugin(BUILT_IN_HELP_MODULE_NAME) { spec -> + return PluginLayout.pluginAutoWithCustomDirName(BUILT_IN_HELP_MODULE_NAME) { spec -> val productLowerCase = productName.replace(' ', '-').lowercase() spec.mainJarName = "$productLowerCase-help.jar" spec.directoryName = "${productName.replace(" ", "")}Help" spec.excludeFromModule(BUILT_IN_HELP_MODULE_NAME, "com/jetbrains/builtInHelp/indexer/**") - spec.doNotCopyModuleLibrariesAutomatically(listOf("jsoup")) spec.withGeneratedResources { targetDir, buildContext -> val assetJar = targetDir.resolve("lib/help-$productLowerCase-assets.jar") buildResourcesForHelpPlugin( @@ -42,15 +41,18 @@ internal fun buildHelpPlugin(pluginVersion: String, context: BuildContext): Plug ) } spec.withPatch { patcher, buildContext -> - patcher.patchModuleOutput(moduleName = BUILT_IN_HELP_MODULE_NAME, - path = "META-INF/services/org.apache.lucene.codecs.Codec", - content = "org.apache.lucene.codecs.lucene50.Lucene50Codec") - patcher.patchModuleOutput(moduleName = BUILT_IN_HELP_MODULE_NAME, - path = "META-INF/plugin.xml", - content = pluginXml(buildContext, pluginVersion), - overwrite = PatchOverwriteMode.TRUE) + patcher.patchModuleOutput( + moduleName = BUILT_IN_HELP_MODULE_NAME, + path = "META-INF/services/org.apache.lucene.codecs.Codec", + content = "org.apache.lucene.codecs.lucene50.Lucene50Codec" + ) + patcher.patchModuleOutput( + moduleName = BUILT_IN_HELP_MODULE_NAME, + path = "META-INF/plugin.xml", + content = pluginXml(buildContext, pluginVersion), + overwrite = PatchOverwriteMode.TRUE + ) } - LUCENE_LIBRARIES.forEach { spec.withProjectLibrary(it) } } }