I have a shell script which I want to call from within gradle. The shell script takes optarg like arguments which have to passed to the command line with -P arguments of gradle but I have been unable to think of a better way to do this.
My script is called as below:
./script.ksh -a arg1 -b arg2
My gradle task looks like below
task Build(type: Exec ) {
workingDir rootProject.projectDir.path
executable rootProject.projectDir.path + "/script.ksh"
}
I have tried using "args" but couldn't get this working.
What I am looking for is trying to pass these arguments to gradle in the below format
gradle build ARG1 ARG2