JetBrains Fleet
 

Chained run configurations

Last modified: 11 February 2024

If you want some tasks to be carried out in sequence before the run configuration starts, you can configure that behavior with the dependsOn property. For example:

{
    "configurations": [
        {
            "type": "command",
            "name": "final",
            "dependsOn": ["first", "second"],
            "program": "echo",
            "args": ["final"]
        }, {
            "type": "command",
            "name": "first",
            "program": "echo",
            "args": ["first"]
        }, {
            "type": "command",
            "name": "second",
            "program": "echo",
            "args": ["second"]
        }
    ]
}

When you run final, it will execute the run configurations specified in the dependsOn property step-by-step:

first
second
final

The referenced run configurations do not need to be in the same run.json file. You can also create sequences using run configurations from run.json files in nested projects. If there is a naming conflict, the run configuration from the same run.json takes precedence.