I want to create a shell script that runs the blocking Gradle task ./gradlew runIdeForUiTests in the background.
From the terminal, this could be accomplished by running ./gradlew runIdeForUiTests &, but when I put this line in a shell script and run the shellscript without an ampersand from the terminal, it doesn't run in the background.
I've tried https://stackoverflow.com/a/48620810/10175681 but nohup doesn't seem to run in the background (you have to press Ctrl+C to terminate the program).
It's the same for this answer: https://stackoverflow.com/a/49834743/10175681.
Is there a way to run the task in the background without the user starting the script having to type an ampersand?
Thanks!