Skip to content

Commit

Permalink
Merge branch 'develop' into discover-gradle-builds-by-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Oct 16, 2024
2 parents 847af34 + 9542e91 commit 8fb3dd5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,14 @@ export class GradleTasksTreeDataProvider implements vscode.TreeDataProvider<vsco
}

const projectPath = definition.script.split(":").slice(0, -1);
let projectTreeItem = projectTreeItemMap.get(projectPath.join(":"));
const projectMapKey = definition.projectFolder + "_" + projectPath.join(":");
let projectTreeItem = projectTreeItemMap.get(projectMapKey);
if (!projectTreeItem) {
const parentProjectPath = projectPath.length == 0 ? null : projectPath.slice(0, -1);
const parentProject =
parentProjectPath === null
? gradleProjectTreeItem
: projectTreeItemMap.get(parentProjectPath.join(":"));
: projectTreeItemMap.get(definition.projectFolder + "_" + parentProjectPath.join(":"));
projectTreeItem = new ProjectTreeItem(
definition.project,
parentProject,
Expand All @@ -271,7 +272,7 @@ export class GradleTasksTreeDataProvider implements vscode.TreeDataProvider<vsco
} else {
gradleProjectTreeItem.addProject(projectTreeItem);
}
projectTreeItemMap.set(projectPath.join(":"), projectTreeItem);
projectTreeItemMap.set(projectMapKey, projectTreeItem);
}

const taskName = definition.script.slice(definition.script.lastIndexOf(":") + 1);
Expand Down

0 comments on commit 8fb3dd5

Please sign in to comment.