GradleBuildRootsManager: fix onProjectsLinked
This commit is contained in:
+2
-1
@@ -138,6 +138,7 @@ class GradleBuildRootsManager(val project: Project) : ScriptingSupport.Provider(
|
|||||||
// other scripts: "included", "precompiled" scripts, scripts in unlinked projects,
|
// other scripts: "included", "precompiled" scripts, scripts in unlinked projects,
|
||||||
// or just random files with ".gradle.kts" ending
|
// or just random files with ".gradle.kts" ending
|
||||||
|
|
||||||
|
// todo(gradle6): remove, it is required only for projects with old gradle
|
||||||
if (searchNearestLegacy) {
|
if (searchNearestLegacy) {
|
||||||
val found = roots.findNearestRoot(filePath)
|
val found = roots.findNearestRoot(filePath)
|
||||||
if (found is GradleBuildRoot.Legacy) return ScriptUnderRoot(found)
|
if (found is GradleBuildRoot.Legacy) return ScriptUnderRoot(found)
|
||||||
@@ -221,7 +222,7 @@ class GradleBuildRootsManager(val project: Project) : ScriptingSupport.Provider(
|
|||||||
val listener = object : GradleSettingsListenerAdapter() {
|
val listener = object : GradleSettingsListenerAdapter() {
|
||||||
override fun onProjectsLinked(settings: MutableCollection<GradleProjectSettings>) {
|
override fun onProjectsLinked(settings: MutableCollection<GradleProjectSettings>) {
|
||||||
settings.forEach {
|
settings.forEach {
|
||||||
loadLinkedRoot(it)
|
add(loadLinkedRoot(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user