Skip to content

In multi-root workspace, it cannot exclude the project by using gradle.nestedProjects settings. #1785

@leolcao

Description

@leolcao

Extension Name: vscode-gradle
Extension Version: 3.17.2
OS Version: Windows 11 25h2
VSCode version: 1.111.0

Describe the bug
Let's assume:

E:\a.git
E:\b.git
E:\a-b.code-workspace

In the workspace settings:

{
  "folders": [
    {
      "path": "a.git",
    },
    {
      "path": "b.git",
    },
  ],
  "settings": {
    "java.gradle.buildServer.enabled": true,
    "java.import.gradle.enabled": true,
    "gradle.nestedProjects": [
      "${workspaceFolder:a.git}",
// exclude the b.git
//      "${workspaceFolder:b.git}",
    ],
  },
}

Now, b.git will build failed, a.git will build successfully.
I find even exclude the b.git, the gradle for java still process it, and b.git will be shown in the sidear. What I can do is remove b.git from this multi-root workspace.

To Reproduce
Like above description.

Expected behavior
I want to exclude some project in one multi-root workspace, and don't show it in the sidebar, and not affect other projects.

Another related bug is #1784

Screenshots
If applicable, add screenshots to help explain your problem.

Output from "Gradle for Java"
I can see the logs about processing b.git.

Does the bug still exist if you disable all other extensions?
Yes/No

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions