Configuring a dependent task in vscode

I have the nrfConnect task that builds my project in vscode.

I need to add a script to execute before the nrfConnect task.

I added a task to my tasks.json but the task that I need to execute before the nrfConnect build, does not execute;;

I even replaced the script with a simple echo command and it still does not execute - I do not see the string "I AM A SUBTASK" in the terminal output

My tasks.json script below

What am I missing?

Thanks

Andy

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "subtask1",
            "type": "shell",
            "command": "echo I AM A SUBTASK"
        },
        {
            "type": "nrf-connect-build",
            "config": "${workspaceFolder}/build",
            "runCmake": false,
            "problemMatcher": [
                "$gcc",
                "$cmake",
                "$kconfig",
                "$kconfig_syntax",
                "$kconfig_syntax_files",
                "$dts",
                "$dts_syntax"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "label": "nRF Connect: Build myproject/build (active-debug)",
            "dependsOn": [
                "subtask1"
            ],

        }
    ]
}

Parents Reply Children
Related