HMPP: import flag indicating that the project uses HMPP feature
Original commit: e791b9d3f7
This commit is contained in:
@@ -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)) })
|
||||
|
||||
Reference in New Issue
Block a user