mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[build scripts] take into account ContentModuleFilter when building the core plugin as well (IJPL-186408)
GitOrigin-RevId: d409063711a90043a04901182eb65f4bd1bb2f07
This commit is contained in:
committed by
intellij-monorepo-bot
parent
feb0e6c6cf
commit
e457877aa4
@@ -634,10 +634,19 @@ private fun getModuleDescriptor(moduleName: String, jpsModuleName: String, xIncl
|
||||
|
||||
private suspend fun collectAndEmbedProductModules(root: Element, xIncludePathResolver: XIncludePathResolver, context: BuildContext): Set<ModuleItem> {
|
||||
val frontendModuleFilter = context.getFrontendModuleFilter()
|
||||
val contentModuleFilter = context.getContentModuleFilter()
|
||||
val result = LinkedHashSet<ModuleItem>()
|
||||
for (moduleElement in (root.getChildren("content").asSequence().flatMap { it.getChildren("module") })) {
|
||||
val moduleElements = root.getChildren("content").flatMap { it.getChildren("module") }
|
||||
for (moduleElement in moduleElements) {
|
||||
val moduleName = moduleElement.getAttributeValue("name") ?: continue
|
||||
val loadingRule = moduleElement.getAttributeValue("loading")
|
||||
val dependencyHelper = (context as BuildContextImpl).jarPackagerDependencyHelper
|
||||
if (dependencyHelper.isOptionalLoadingRule(loadingRule) && !contentModuleFilter.isOptionalModuleIncluded(moduleName, pluginMainModuleName = null)) {
|
||||
Span.current().addEvent("Tag for module '$moduleName' is removed from the core plugin by $contentModuleFilter")
|
||||
moduleElement.parent.removeContent(moduleElement)
|
||||
continue
|
||||
}
|
||||
|
||||
val relativeOutFile = if (loadingRule == "embedded") getProductModuleJarName(moduleName, context, frontendModuleFilter) else "modules/$moduleName.jar"
|
||||
result.add(ModuleItem(moduleName = moduleName, relativeOutputFile = relativeOutFile, reason = ModuleIncludeReasons.PRODUCT_MODULES))
|
||||
PRODUCT_MODULE_IMPL_COMPOSITION.get(moduleName)?.let {
|
||||
|
||||
Reference in New Issue
Block a user