diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/JarPackager.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/JarPackager.kt index b237c7ecdd65..d93338259f3d 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/JarPackager.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/JarPackager.kt @@ -78,10 +78,12 @@ private val notImportantKotlinLibs = java.util.Set.of( "kotlinx-html-jvm", ) +const val rdJarName = "rd.jar" + private val predefinedMergeRules = HashMap Boolean>().let { map -> map.put("groovy.jar") { it, _ -> it.startsWith("org.codehaus.groovy:") } map.put("jsch-agent.jar") { it, _ -> it.startsWith("jsch-agent") } - map.put("rd.jar") { it, _ -> it.startsWith("rd-") } + map.put(rdJarName) { it, _ -> it.startsWith("rd-") } // all grpc garbage into one jar map.put("grpc.jar") { it, _ -> it.startsWith("grpc-") } // separate file to use in Gradle Daemon classpath diff --git a/platform/build-scripts/testFramework/src/com/intellij/platform/buildScripts/testFramework/RuntimeModuleRepositoryChecker.kt b/platform/build-scripts/testFramework/src/com/intellij/platform/buildScripts/testFramework/RuntimeModuleRepositoryChecker.kt index 404af5b66d52..5eb84c6825eb 100644 --- a/platform/build-scripts/testFramework/src/com/intellij/platform/buildScripts/testFramework/RuntimeModuleRepositoryChecker.kt +++ b/platform/build-scripts/testFramework/src/com/intellij/platform/buildScripts/testFramework/RuntimeModuleRepositoryChecker.kt @@ -180,14 +180,16 @@ class RuntimeModuleRepositoryChecker private constructor( val included = resourceRoots.find { it in productResourceRoots } if (included != null && moduleId !in allProductModules) { val includedModules = productResourceRoots.getValue(included) - val firstIncludedModuleData = includedModules.take(3).joinToString(", ") { includedModuleId -> - "'${includedModuleId.stringId}' (<- ${allProductModules.getValue(includedModuleId).joinToString(" <- ")})" + val displayedModulesCount = 10 + val firstIncludedModuleData = includedModules.take(displayedModulesCount).joinToString(separator = System.lineSeparator()) { + "'${it.stringId}' (<- ${allProductModules.getValue(it).joinToString(" <- ")})" } - val rest = includedModules.size - 3 + val rest = includedModules.size - displayedModulesCount val more = if (rest > 0) " and $rest more ${StringUtil.pluralize("module", rest)}" else "" softly.collectAssertionError(AssertionError(""" |Module '${moduleId.stringId}' is not part of '$productModulesModule', but it's packed in ${included.pathString}, - |which is included in classpath because $firstIncludedModuleData$more are also packed in it, so '${moduleId.stringId}' will be + |which is included in classpath because: + |$firstIncludedModuleData$more are also packed in it, so '${moduleId.stringId}' will be |included in the classpath as well. Unnecessary code and resources in the classpath may cause performance problems, also, they |may cause '$productModulesModule' to behave differently in a standalone installation and when invoked from '${context.applicationInfo.fullProductName}' |so it's better to fix the problem. Usually, to do that you need to change build scripts to put '${moduleId.stringId}' in a