mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-17 15:52:30 +00:00
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 {
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user