blob: 4551b41ce9f0275b64c9b4e9b58f773ae4a149ff [file] [log] [blame] [edit]
// Copyright 2025 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as vscode from 'vscode';
/**
* initialize task provider for the extension
*/
export function setUpFuchsiaTaskProvider(context: vscode.ExtensionContext) {
vscode.tasks.registerTaskProvider('fuchsia', {
provideTasks(): vscode.Task[] {
const buildTask = new vscode.Task(
{
type: 'fuchsia', 'presentation': {
'showReuseMessage': false,
}
},
vscode.TaskScope.Workspace,
'fx build',
'Fuchsia Extension',
new vscode.ShellExecution('fx build'),
'$cpp-rust-build'
);
buildTask.group = vscode.TaskGroup.Build;
return [buildTask];
},
resolveTask(task: vscode.Task): vscode.ProviderResult<vscode.Task> {
return task;
}
});
}