In a run configuration, is there a way to only pic...
# fleet
h
In a run configuration, is there a way to only pick the first two dirs in
$FILE_DIR$
? e.g. "sub/project2/src/main/com/example" would become "sub/project2". That way we could support running project agnostic gradle tasks in multi-projects. (e.g. running a kotest in a
gradle
run configuration)
Here's an example of how that would look:
Copy code
{
    "configurations": [
      {
        "type": "gradle",
        "name": "Run Gradle test",
        "tasks": [ "test" ],
        "args": [ "-p", "$RELATIVE_FILE_DIR_FIRST_TWO$", 
                  "--tests", "$FILE_NAME_NO_EXT$"],
        "workingDir": "$PROJECT_DIR$",
      },
    ]
}
Here
RELATIVE_FILE_DIR_FIRST_TWO
is the would-be new macro that gives the first two dirs relative to the project root directory. We are now able to run a kotest in a Gradle multi-project.