Add ability to postpone script configuration loading
Show notification for scripts with out of date configurations ^KT-35573
This commit is contained in:
+3
-1
@@ -78,7 +78,9 @@ class GradleScriptConfigurationLoader(project: Project) : DefaultScriptConfigura
|
||||
}
|
||||
}
|
||||
|
||||
return super.loadDependencies(isFirstLoad, ktFile, scriptDefinition, context)
|
||||
val result = getConfigurationThroughScriptingApi(ktFile, vFile, scriptDefinition)
|
||||
context.saveNewConfiguration(vFile, result)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun getInputsStamp(virtualFile: VirtualFile, file: KtFile): CachedConfigurationInputs {
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ open class GradleScriptListener(project: Project) : ScriptChangeListener(project
|
||||
// do nothing
|
||||
} else {
|
||||
val file = getAnalyzableKtFileForScript(vFile) ?: return
|
||||
updater.ensureUpToDatedConfigurationSuggested(file)
|
||||
updater.suggestToUpdateConfigurationIfOutOfDate(file)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ open class GradleScriptListener(project: Project) : ScriptChangeListener(project
|
||||
val file = getAnalyzableKtFileForScript(vFile)
|
||||
if (file != null) {
|
||||
// *.gradle.kts file was changed
|
||||
updater.ensureUpToDatedConfigurationSuggested(file)
|
||||
updater.suggestToUpdateConfigurationIfOutOfDate(file)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user