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 isTestModule: Boolean = false
|
||||||
|
|
||||||
var externalProjectId: String = ""
|
var externalProjectId: String = ""
|
||||||
|
var isHmppEnabled: Boolean = false
|
||||||
}
|
}
|
||||||
|
|
||||||
interface KotlinFacetSettingsProvider {
|
interface KotlinFacetSettingsProvider {
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings {
|
|||||||
} ?: KotlinModuleKind.DEFAULT
|
} ?: KotlinModuleKind.DEFAULT
|
||||||
isTestModule = element.getAttributeValue("isTestModule")?.toBoolean() ?: false
|
isTestModule = element.getAttributeValue("isTestModule")?.toBoolean() ?: false
|
||||||
externalProjectId = element.getAttributeValue("externalProjectId") ?: ""
|
externalProjectId = element.getAttributeValue("externalProjectId") ?: ""
|
||||||
|
isHmppEnabled = element.getAttribute("isHmppProject")?.booleanValue ?: false
|
||||||
element.getChild("compilerSettings")?.let {
|
element.getChild("compilerSettings")?.let {
|
||||||
compilerSettings = CompilerSettings()
|
compilerSettings = CompilerSettings()
|
||||||
XmlSerializer.deserializeInto(compilerSettings!!, it)
|
XmlSerializer.deserializeInto(compilerSettings!!, it)
|
||||||
@@ -326,6 +327,9 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) {
|
|||||||
if (externalProjectId.isNotEmpty()) {
|
if (externalProjectId.isNotEmpty()) {
|
||||||
element.setAttribute("externalProjectId", externalProjectId)
|
element.setAttribute("externalProjectId", externalProjectId)
|
||||||
}
|
}
|
||||||
|
if (isHmppEnabled) {
|
||||||
|
element.setAttribute("isHmppProject", isHmppEnabled.toString())
|
||||||
|
}
|
||||||
productionOutputPath?.let {
|
productionOutputPath?.let {
|
||||||
if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) {
|
if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) {
|
||||||
element.addContent(Element("productionOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })
|
element.addContent(Element("productionOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })
|
||||||
|
|||||||
Reference in New Issue
Block a user