Skip to content

Getting "There is not task provider registered for tasks of type gradle" #995

@stefanrybacki

Description

@stefanrybacki

Extension Name: vscode-gradle
Extension Version: 3.6.1
OS Version: Ubuntu 20.04
VSCode version: 1.60.0

Describe the bug
When using the following task configuration I get the error message mentioned above.

    {
      "type": "gradle",
      "id": "id1",
      "script": "project1:copyTestFiles",
      "description": "",
      "group": "other",
      "project": "project1",
      "buildFile": "project1/build.gradle",
      "rootProject": "rootProject",
      "projectFolder": "${workspaceFolder}/project1",
      "workspaceFolder": "${workspaceFolder}",
      "args": "",
      "javaDebug": false,
      "problemMatcher": [
        "$gradle"
      ],
      "label": "gradle: project1:copyTestFiles"
    }

Note I changed absolute paths to relative paths. I works when using absolute paths, however absolute paths are pointless as the tasks.json file is version controlled and used by multiple different people.

To Reproduce
Create gradle task in tasks.json

Expected behavior
The task is recognized and executed correctly

Output from "Gradle Tasks"

Error: The gradle task detection didn't contribute a task for the following configuration:
    {
      "type": "gradle",
      "id": "id1",
      "script": "project1:copyTestFiles",
      "description": "",
      "group": "other",
      "project": "project1",
      "buildFile": "project1/build.gradle",
      "rootProject": "rootProject",
      "projectFolder": "${workspaceFolder}/project1",
      "workspaceFolder": "${workspaceFolder}",
      "args": "",
      "javaDebug": false,
      "problemMatcher": [
        "$gradle"
      ],
      "label": "gradle: project1:copyTestFiles"
    }
The task will be ignored.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions