[build-scripts] Use kotlinx-serialization (not gson library) in ArchivedCompilationContextUtil (IJI-3011)

Also converts ArchivedCompilationContextUtil.java file to ArchivedCompilationContextUtil.kt file.

GitOrigin-RevId: 2e08a242bda539415467d17ae86e01140e84ce9d
This commit is contained in:
Ilia Kirianovskii
2025-09-15 16:01:12 +00:00
committed by intellij-monorepo-bot
parent 741459a2ef
commit b8dc8eb715
14 changed files with 141 additions and 155 deletions
@@ -159,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 = ArchivedCompilationContextUtil.getArchivedCompiledClassesMapping()
val mapping = ArchivedCompilationContextUtil.archivedCompiledClassesMapping
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"