Kotlin Facet: Facet migration workaround for the case pre-1.1-beta -> 1.1.rc+ (reset useProjectSettings to false for old configurations)
This commit is contained in:
@@ -46,6 +46,14 @@ class KotlinFacetConfiguration : FacetConfiguration {
|
|||||||
else {
|
else {
|
||||||
settings = KotlinFacetSettings()
|
settings = KotlinFacetSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Migration problem workaround for pre-1.1-beta releases (mainly 1.0.6) -> 1.1-rc+
|
||||||
|
// Problematic cases: 1.1-beta/1.1-beta2 -> 1.1-rc+ (useProjectSettings gets reset to false)
|
||||||
|
// This heuristic detects old enough configurations:
|
||||||
|
if (element.children.none { it.getAttribute("name").value == "useProjectSettings" }
|
||||||
|
&& settings.compilerInfo.k2jvmCompilerArguments == null) {
|
||||||
|
settings.useProjectSettings = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("OverridingDeprecatedMember")
|
@Suppress("OverridingDeprecatedMember")
|
||||||
|
|||||||
Reference in New Issue
Block a user