From 9ad1f47e9d0247ec12c178519b71f8c0b54034f0 Mon Sep 17 00:00:00 2001 From: Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:32:53 -0400 Subject: [PATCH] build tasks --- .vscode/extensions.json | 2 +- .vscode/settings.json | 12 ++++- .vscode/tasks.json | 102 +++++++++++++++++++++------------------- 3 files changed, 65 insertions(+), 51 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 42d7a36..f35ce82 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["dsobotta.godot-rust-vscode", "geequlim.godot-tools"] + "recommendations": ["dsobotta.godot-rust-vscode", "geequlim.godot-tools", "spencerwmiles.vscode-task-buttons"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 0004ef9..b1e1376 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,14 @@ { "godot-rust.environment.godotEditorPath": "/Applications/Godot.app", - "godot-rust.environment.godotProjectPath": "${workspaceFolder}/godot/" + "godot-rust.environment.godotProjectPath": "${workspaceFolder}/godot/", + "VsCodeTaskButtons.tasks": [ + { + "label": "$(debug-alt) Build", + "alignment": "left", + "task": "godot-rust: Build Debug", + "tooltip": "Builds debug rust game library", + "description": "Build (Debug)", + "color": "default" + } + ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7c0e4c6..027a08c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,51 +1,55 @@ { - "version": "2.0.0", - "tasks": [ - //Godot Editor Operations - { - "label": "godot-rust: Launch Debug Editor", - "detail": "Builds debug rust game library, then opens the project with Godot Editor", - "dependsOn": "godot-rust: Build Debug", - "type": "shell", - "options": { - "cwd": "${config:godot-rust.environment.godotProjectPath}" - }, - "command": "${config:godot-rust.environment.godotEditorPath} --editor", - "group": "build" - }, - { - "label": "godot-rust: Launch Release Editor", - "detail": "Builds release rust game library, then opens the project with Godot Editor", - "dependsOn": "godot-rust: Build Release", - "type": "shell", - "options": { - "cwd": "${config:godot-rust.environment.godotProjectPath}" - }, - "command": "${config:godot-rust.environment.godotEditorPath} --editor", - "group": "build" - }, + "version": "2.0.0", + "tasks": [ + //Godot Editor Operations + { + "label": "godot-rust: Launch Debug Editor", + "detail": "Builds debug rust game library, then opens the project with Godot Editor", + "dependsOn": "godot-rust: Build Debug", + "type": "shell", + "options": { "cwd": "${config:godot-rust.environment.godotProjectPath}" }, + "command": "${config:godot-rust.environment.godotEditorPath} --editor", + "group": "build" + }, + { + "label": "godot-rust: Launch Release Editor", + "detail": "Builds release rust game library, then opens the project with Godot Editor", + "dependsOn": "godot-rust: Build Release", + "type": "shell", + "options": { "cwd": "${config:godot-rust.environment.godotProjectPath}" }, + "command": "${config:godot-rust.environment.godotEditorPath} --editor", + "group": "build" + }, - //Build Operations - { - "label": "godot-rust: Build Debug", - "detail": "Builds debug rust game library", - "type": "shell", - "command": "cargo build", - "group": "build" - }, - { - "label": "godot-rust: Build Release", - "detail": "Builds release rust game library", - "type": "shell", - "command": "cargo build --release", - "group": "build" - }, - { - "label": "godot-rust: Clean", - "detail": "Removes all artifacts of rust game library and its dependencies", - "type": "shell", - "command": "cargo clean", - "group": "build" - } - ] -} \ No newline at end of file + //Build Operations + { + "label": "godot-rust: Build Debug", + "detail": "Builds debug rust game library", + "type": "shell", + "command": "cargo build", + "group": { "kind": "build", "isDefault": true }, + "options": { "cwd": "${workspaceFolder}/rust" }, + "icon": { "id": "debug-alt" }, + "isBackground": false + }, + { + "label": "godot-rust: Build Release", + "detail": "Builds release rust game library", + "type": "shell", + "command": "cargo build --release", + "group": "build", + "options": { "cwd": "${workspaceFolder}/rust" }, + "icon": { "id": "run" }, + "isBackground": false + }, + { + "label": "godot-rust: Clean", + "detail": "Removes all artifacts of rust game library and its dependencies", + "type": "shell", + "command": "cargo clean", + "group": "build", + "options": { "cwd": "${workspaceFolder}/rust" }, + "isBackground": false + } + ] +}