https://kotlinlang.org logo
Title
y

Yevhenii Nadtochii

06/14/2020, 9:09 PM
Hello! Does anybody know what the simplest way to register several run tasks that represent exact copy of original one with changed app arguments ?
gradle run --args='--mode=middle'      ---> gradle run
gradle run --args='--mode=greed'       ---> gradle runGreed OR gradle run greed
gradle run --args='--mode=lavish'      ---> gradle runLavish OR gradle run lavish
o

octylFractal

06/14/2020, 9:12 PM
do you want to literally do it like that on the Gradle command line, or just do
gradle runGreed
?
y

Yevhenii Nadtochii

06/14/2020, 9:21 PM
to literally do it like that on the Gradle command line
I have no idea what it means 🙃 Basically, I was wondering about
gradle runGreed
or
gradle run greed
. what would be simpler
o

octylFractal

06/14/2020, 9:25 PM
https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/options/Option.html would be a possible way to make this so you could do
gradle run --mode=middle
, etc.
y

Yevhenii Nadtochii

06/14/2020, 9:40 PM
okay. but how can I obtain exact copy of
run
without declaring my own JavaExec ?