Scripts: clear manual configuration loading state after project import

^KT-35268
This commit is contained in:
Natalia Selezneva
2020-01-16 09:33:30 +03:00
parent bbdad45201
commit a55a0d94de
2 changed files with 8 additions and 0 deletions
@@ -175,6 +175,12 @@ interface ScriptConfigurationManager {
(getInstance(project) as AbstractScriptConfigurationManager).clearCaches()
}
fun clearManualConfigurationLoadingIfNeeded(file: VirtualFile) {
if (file.LOAD_CONFIGURATION_MANUALLY == true) {
file.LOAD_CONFIGURATION_MANUALLY = null
}
}
fun markFileWithManualConfigurationLoading(file: VirtualFile) {
file.LOAD_CONFIGURATION_MANUALLY = true
}
@@ -69,6 +69,8 @@ class GradleScriptConfigurationLoader(project: Project) : DefaultScriptConfigura
return true
}
ScriptConfigurationManager.clearManualConfigurationLoadingIfNeeded(vFile)
// Gradle read files from FS
GlobalScope.launch(EDT(project)) {
runWriteAction {