MPP: Allow 'implements' relation only within the same Gradle project
Also allow COMMON modules on the "implementer" side
Original commit: 619e2bc0db
This commit is contained in:
@@ -216,6 +216,8 @@ class KotlinFacetSettings {
|
||||
var kind: KotlinModuleKind = KotlinModuleKind.DEFAULT
|
||||
var sourceSetNames: List<String> = emptyList()
|
||||
var isTestModule: Boolean = false
|
||||
|
||||
var externalProjectId: String = ""
|
||||
}
|
||||
|
||||
interface KotlinFacetSettingsProvider {
|
||||
|
||||
@@ -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)) })
|
||||
|
||||
Reference in New Issue
Block a user