Import list of pure kotlin source roots from gradle
in facet settings for inspections
#KT-32300 Fixed
Original commit: c98ad923bd
This commit is contained in:
@@ -240,6 +240,8 @@ class KotlinFacetSettings {
|
||||
|
||||
var externalProjectId: String = ""
|
||||
var isHmppEnabled: Boolean = false
|
||||
|
||||
var pureKotlinSourceFolders: List<String> = emptyList()
|
||||
}
|
||||
|
||||
interface KotlinFacetSettingsProvider {
|
||||
|
||||
@@ -161,6 +161,7 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings {
|
||||
isTestModule = element.getAttributeValue("isTestModule")?.toBoolean() ?: false
|
||||
externalProjectId = element.getAttributeValue("externalProjectId") ?: ""
|
||||
isHmppEnabled = element.getAttribute("isHmppProject")?.booleanValue ?: false
|
||||
pureKotlinSourceFolders = element.getAttributeValue("pureKotlinSourceFolders")?.split(";")?.toList() ?: emptyList()
|
||||
element.getChild("compilerSettings")?.let {
|
||||
compilerSettings = CompilerSettings()
|
||||
XmlSerializer.deserializeInto(compilerSettings!!, it)
|
||||
@@ -331,6 +332,9 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) {
|
||||
if (isHmppEnabled) {
|
||||
element.setAttribute("isHmppProject", isHmppEnabled.toString())
|
||||
}
|
||||
if (pureKotlinSourceFolders.isNotEmpty()) {
|
||||
element.setAttribute("pureKotlinSourceFolders", pureKotlinSourceFolders.joinToString(";"))
|
||||
}
|
||||
productionOutputPath?.let {
|
||||
if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) {
|
||||
element.addContent(Element("productionOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })
|
||||
|
||||
Reference in New Issue
Block a user