This commit is contained in:
Richard Willis 2019-11-13 15:25:06 +01:00
Родитель 46f9682600
Коммит 83d53eee4d
8 изменённых файлов: 14 добавлений и 17 удалений

Просмотреть файл

@ -152,7 +152,7 @@
],
"taskDefinitions": [
{
"type": "richardwillis.gradle",
"type": "gradle",
"required": [
"task",
"buildFile"

Просмотреть файл

@ -54,10 +54,7 @@ function registerTaskProvider(
statusBarItem,
outputChannel
);
const taskProvider = vscode.tasks.registerTaskProvider(
'richardwillis.gradle',
provider
);
const taskProvider = vscode.tasks.registerTaskProvider('gradle', provider);
context.subscriptions.push(watcher);
context.subscriptions.push(workspaceWatcher);

Просмотреть файл

@ -159,7 +159,7 @@ export class GradleTasksTreeDataProvider
enableTaskDetection();
this.taskTree = null;
this.taskItemsPromise = vscode.tasks
.fetchTasks({ type: 'richardwillis.gradle' })
.fetchTasks({ type: 'gradle' })
.then((tasks = []) => {
this._onDidChangeTreeData.fire();
return tasks;

Просмотреть файл

@ -226,7 +226,7 @@ export async function createTask(
}
definition = {
type: 'richardwillis.gradle',
type: 'gradle',
task: taskDefinitionOrTaskName,
buildFile: path.basename(gradleBuildFileUri.fsPath),
subProjectBuildFile

Просмотреть файл

@ -38,7 +38,7 @@ describe(fixtureName, () => {
let tasks: vscode.Task[];
beforeEach(async () => {
tasks = await vscode.tasks.fetchTasks({ type: 'richardwillis.gradle' });
tasks = await vscode.tasks.fetchTasks({ type: 'gradle' });
});
it('should load tasks', () => {
@ -57,9 +57,9 @@ describe(fixtureName, () => {
it('should refresh tasks', async () => {
await vscode.commands.executeCommand('gradle.refresh');
const task = (
await vscode.tasks.fetchTasks({ type: 'richardwillis.gradle' })
).find(task => task.name === 'hello');
const task = (await vscode.tasks.fetchTasks({ type: 'gradle' })).find(
task => task.name === 'hello'
);
assert.ok(task);
});
});

Просмотреть файл

@ -28,7 +28,7 @@ describe(fixtureName, () => {
let tasks: vscode.Task[];
beforeEach(async () => {
tasks = await vscode.tasks.fetchTasks({ type: 'richardwillis.gradle' });
tasks = await vscode.tasks.fetchTasks({ type: 'gradle' });
});
it('should load tasks', async () => {

Просмотреть файл

@ -23,7 +23,7 @@ describe(fixtureName, () => {
let tasks: vscode.Task[];
beforeEach(async () => {
tasks = await vscode.tasks.fetchTasks({ type: 'richardwillis.gradle' });
tasks = await vscode.tasks.fetchTasks({ type: 'gradle' });
});
it('should load groovy default build file tasks', () => {
@ -71,9 +71,9 @@ describe(fixtureName, () => {
it('should refresh tasks', async () => {
await vscode.commands.executeCommand('gradle.refresh');
const task = (
await vscode.tasks.fetchTasks({ type: 'richardwillis.gradle' })
).find(task => task.name === 'hello');
const task = (await vscode.tasks.fetchTasks({ type: 'gradle' })).find(
task => task.name === 'hello'
);
assert.ok(task);
});
});

Просмотреть файл

@ -13,7 +13,7 @@ describe('without any build file or local gradle wrapper', () => {
if (extension) {
assert.equal(extension.isActive, false);
const tasks = await vscode.tasks.fetchTasks({
type: 'richardwillis.gradle'
type: 'gradle'
});
assert.equal(tasks.length === 0, true);
}