欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vscode中task.json文件模板

程序员文章站 2022-06-22 17:05:55
...
{
    "version": "2.0.0",
    //每次执行都启动一个新的控制台
    "presentation": {
        "reveal": "always",
        "panel": "new",
        "echo": true
    },
    //设置环境变量
    "options": {
        "env": {
            "LINUX_SRC_HOME": "/home/user/system/packages/services/Car/evs",
            "LOCAL_SRC_HOME": "${workspaceRoot}"
        }
    },
    "type": "shell",
    "problemMatcher": {
        "owner": "vs_code",
        "fileLocation": [
            "relative",
            "${workspaceRoot}"
        ],
        "pattern": {
            "regexp": ".*(app/.*|project/.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
            "file": 1,
            "line": 2,
            "column": 3,
            "severity": 4,
            "message": 5
        }
    },
    //任务列表
    "tasks": [
        {
            "label": "01.[同步代码]本地代码->Linux远程服务器",
            "command": "${workspaceRoot}\\.vscode\\sync_code.cmd",
            "args": [
                "native",
                "False"
            ],
            "identifier": "CodeSync",
            "taskClassify": "同步代码"
        },
		
        {
            "label": "02.[同步代码并获取修改文件列表]本地代码-->Linux远程服务器",
            "command": "${workspaceRoot}\\.vscode\\sync_code.cmd",
            "args": [
                "native",
                "True"
            ],
            "identifier": "CodeSyncDiff",
            "taskClassify": "同步代码"
        },	
		
        {
            "label": "03.[编译IT]在Linux远程服务器上编译IT工程",
            "dependsOn": "CodeSync",
            "command": "${workspaceRoot}\\.vscode\\build_obj.cmd",
            "args": [
                "test",
                "DTCenter.out",
                "it_cfg",
                "Debug",
                "-j8",
                "cache"
            ],
            "taskClassify": "编译IT工程"
        },
        {
            "label": "04.[同步+编译+IT]在Linux远程服务器上构建IT工程并运行",
            "dependsOn": "CodeSync",
            "command": "${workspaceRoot}\\.vscode\\build_and_run_IT.cmd ratmng.nrom.cfgslave",
            "taskClassify": "同步+编译+IT工程"
        },     
        {
            "label": "05.[静态检查]代码静态检查",
            "dependsOn": "CodeSyncDiff",
            "command": "${workspaceRoot}\\.vscode\\inc_build_flint.cmd",
            "taskClassify": "flint"
        },
        {
            "label": "06.[增量构建] 代码增量compile",
            "dependsOn": "CodeSyncDiff",
            "command": "${workspaceRoot}\\.vscode\\inc_build_compile.cmd",
            "taskClassify": "增量编译"
        }
    ]
}