I want to create a task in gradle that executes a command
gradle bootRun -Dspring.profiles.active=test
This command does exactly what I want to do if it is executed from the command line, but I could not use the type: Exec for the task, and there is also no luck in the System Properties
I really do not want to do this in an external command that the user needs to know about the launch. I would like it to appear under tasks / others.
My nearest attempt:
task bootRunTest() {
executable "gradle"
args "-Dspring.profiles.active=test bootRun"
}
source
share