[build-scripts] Move PathManager.getArchivedCompliedClassesLocation()/.getArchivedCompliedClassesMapping() to a new ArchivedCompilationContextUtil (IJI-3011)

Also renames ArchivedCompilationContextUtil.getArchivedCompiledClassesLocation()/.getArchivedCompiledClassesLocationIfIsRunningFromBazelOut().

GitOrigin-RevId: dd5d8b65f46ead13e53f0fdf9b99a6e999b3a9e7
This commit is contained in:
Ilia Kirianovskii
2025-09-15 16:01:12 +00:00
committed by intellij-monorepo-bot
parent 1613e79e2d
commit 741459a2ef
19 changed files with 181 additions and 150 deletions
@@ -10,6 +10,7 @@ import com.intellij.ide.plugins.IdeaPluginDescriptor
import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.idea.AppMode
import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ArchivedCompilationContextUtil
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.PluginPathManager
import com.intellij.openapi.diagnostic.logger
@@ -158,7 +159,7 @@ private fun findClassesRoots(relativePath: String, plugin: IdeaPluginDescriptor,
val fileName = FileUtilRt.getNameWithoutExtension(PathUtilRt.getFileName(relativePath))
//try restoring module name from JAR name automatically generated by BaseLayout.convertModuleNameToFileName
val moduleName = if (relativePath.startsWith("modules/")) fileName else "intellij." + fileName.replace('-', '.')
val mapping = PathManager.getArchivedCompiledClassesMapping()
val mapping = ArchivedCompilationContextUtil.getArchivedCompiledClassesMapping()
if (mapping != null) {
// baseFile is ".../idea-compile-parts-v2/production/<module-name>/"
// We should take ".../idea-compile-parts-v2/production/<module-name-2>/<hash>.jar"