HMPP: import flag indicating that the project uses HMPP feature

Original commit: e791b9d3f7
This commit is contained in:
Andrey Uskov
2019-06-14 23:46:13 +03:00
parent 96bcadbbba
commit d7bd959bd8
2 changed files with 5 additions and 0 deletions
@@ -239,6 +239,7 @@ class KotlinFacetSettings {
var isTestModule: Boolean = false
var externalProjectId: String = ""
var isHmppEnabled: Boolean = false
}
interface KotlinFacetSettingsProvider {
@@ -160,6 +160,7 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings {
} ?: KotlinModuleKind.DEFAULT
isTestModule = element.getAttributeValue("isTestModule")?.toBoolean() ?: false
externalProjectId = element.getAttributeValue("externalProjectId") ?: ""
isHmppEnabled = element.getAttribute("isHmppProject")?.booleanValue ?: false
element.getChild("compilerSettings")?.let {
compilerSettings = CompilerSettings()
XmlSerializer.deserializeInto(compilerSettings!!, it)
@@ -326,6 +327,9 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) {
if (externalProjectId.isNotEmpty()) {
element.setAttribute("externalProjectId", externalProjectId)
}
if (isHmppEnabled) {
element.setAttribute("isHmppProject", isHmppEnabled.toString())
}
productionOutputPath?.let {
if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) {
element.addContent(Element("productionOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })