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 68fe7afa20c..7883fb746d5 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt @@ -151,6 +151,8 @@ class KotlinFacetSettings { } var implementedModuleName: String? = null + + var testOutputPath: String? = null } fun TargetPlatformKind<*>.createCompilerArguments(init: CommonCompilerArguments.() -> Unit = {}): CommonCompilerArguments { 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 8551ed971f8..167bb61393c 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt @@ -108,6 +108,9 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings { compilerArguments = platformKind.createCompilerArguments() XmlSerializer.deserializeInto(compilerArguments!!, it) } + testOutputPath = element.getChild("testOutputPath")?.let { + PathUtil.toSystemDependentName((it.content.firstOrNull() as? Text)?.textTrim) + } ?: (compilerArguments as? K2JSCompilerArguments)?.outputFile } } @@ -232,6 +235,11 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) { implementedModuleName?.let { element.addContent(Element("implements").apply { addContent(it) }) } + testOutputPath?.let { + if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) { + element.addContent(Element("testOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) }) + } + } compilerSettings?.let { copyBean(it) }?.let { it.convertPathsToSystemIndependent() buildChildElement(element, "compilerSettings", it, filter)