I'm developing an intelliJ plugin that has to run console commands.
I would like to call commands in the current project's root directory.
I'm having trouble with it. So far I only succeeded to run commands on the plugin's directory.
I tried using code I saw on StackOverflow:
ArrayList<String> cmds = new ArrayList<>();
GeneralCommandLine generalCommandLine = new GeneralCommandLine(cmds);
ProcessHandler processHandler = new OSProcessHandler(generalCommandLine);
But I get this error when I run or debug the task:
Cannot run program ".\gradlew" (in directory ..): CreateProcess error=2, The system cannot find the file specified
It tries to find ./gradlew on the project's dir and obviously it is on the plugin's dir.. can anyone help please?