[build-scripts] Don't use directory asset descriptor if jars in JarPackager#computeSourcesForModule (IJI-2700)

GitOrigin-RevId: 5e1887e37279704f8507637d81c4a3d3e81917ec
This commit is contained in:
Ilia Kirianovskii
2025-06-04 11:46:19 +00:00
committed by intellij-monorepo-bot
parent 7c61e81ada
commit 70776bec8f
@@ -296,7 +296,8 @@ class JarPackager private constructor(
val packToDir = context.options.isUnpackedDist &&
!item.relativeOutputFile.contains('/') &&
(patchedContent.isEmpty() || (patchedContent.size == 1 && patchedContent.containsKey("META-INF/plugin.xml"))) &&
extraExcludes.isEmpty()
extraExcludes.isEmpty() &&
!moduleOutDir.toString().endsWith(".jar")
val outFile = outDir.resolve(item.relativeOutputFile)
val asset = if (packToDir) {
@@ -934,6 +935,9 @@ private suspend fun buildAsset(
SizeAndHash(size = 0, hash = computeHashForModuleOutput(it as DirSource))
}
}
else {
error("Unexpected source: $source")
}
}
}
return BuildAssetResult(sourceToNativeFiles = emptyMap(), sourceToMetadata = sourceToMetadata)