diff --git a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt index 14c0d2f3136..912246c6457 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt @@ -216,6 +216,8 @@ class KotlinFacetSettings { var kind: KotlinModuleKind = KotlinModuleKind.DEFAULT var sourceSetNames: List = emptyList() var isTestModule: Boolean = false + + var externalProjectId: String = "" } interface KotlinFacetSettingsProvider { diff --git a/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt b/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt index 33eb65f939a..d0480dfbcc5 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt @@ -132,6 +132,7 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings { } else null } ?: KotlinModuleKind.DEFAULT isTestModule = element.getAttributeValue("isTestModule")?.toBoolean() ?: false + externalProjectId = element.getAttributeValue("externalProjectId") ?: "" element.getChild("compilerSettings")?.let { compilerSettings = CompilerSettings() XmlSerializer.deserializeInto(compilerSettings!!, it) @@ -292,6 +293,9 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) { element.addContent(Element("newMppModelJpsModuleKind").apply { addContent(kind.name) }) element.setAttribute("isTestModule", isTestModule.toString()) } + if (externalProjectId.isNotEmpty()) { + element.setAttribute("externalProjectId", externalProjectId) + } productionOutputPath?.let { if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) { element.addContent(Element("productionOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })