gradle.kts: do not return ErrorScriptDefinition into GradleBuildRootManager

In this case script definition is saved into script info,
but only real script definitions should be cached
In case of null script configurations will be reloaded into cache when scriptdefinitions will be ready

^KT-39910 Fixed
This commit is contained in:
Natalia Selezneva
2020-07-07 15:12:10 +03:00
parent 3e3f8aeb93
commit 5954fe528b
@@ -64,6 +64,10 @@ class GradleScriptDefinitionsContributor(private val project: Project) : ScriptD
}
val root = LightGradleBuildRoot(workingDir, gradleHome, javaHome)
with(contributor) {
if (root.isError()) return null
}
val definitions = contributor.definitionsByRoots[root]
if (definitions == null) {
scriptingInfoLog(