How to run `runServer` inside a different folder

I would like to have gradlew runServer run the server inside a folder on my desktop, as opposed to the project directory. Though I don’t know where to begin.

(Feeling kinda bad about asking a real simple question here! I’m just new to modding and unsure where else to check.)

I probably know less about it than you, but looking at gradlew --help, it looks like the -p or --project-dir option allows you to specify a custom directory to start the task in.