You can also restrict task bindings to a given build configuration or a set of build configurations. For example, see the following lines in the binding configuration file:
{
"nrf-connect.taskBindings": {
"flash": [
{
"taskName": "My custom flash",
"buildConfigs": [
"build",
"${workspaceFolder}/hello_world/build_1"
"${workspaceFolder}/samples/bluetooth/perihperal_hids/build",
]
}
]
}
}
With this configuration, the My custom flash task runs only if the path of the active build matches the one that is listed in the buildConfigs property.
Note
The buildConfigs property is optional. If this property is not defined, then the binding will apply to all configurations.