Is it possible to call a gradle script withing it self


(Vinay Verma) #1

I tried to write some code under which I am calling my Deploy.gradle script within itself if met some conditions (by passing different parameter).
When doing so, the script is not failing but it is also not working as expected.

Means it is not reading one provided file which I need to read.
While it is reading that one provided file if I don’t go under those conditions (which call script itself).

Can somebody help me out here.

Thanks in Advance :slight_smile:


(uklance) #2

You can use GradleBuild task to fire a task from another build file


(Vinay Verma) #3

Thanks for Your answer. I found the way on yesterday itself :slight_smile:

Thanks Again :slight_smile:


(Schalk Cronjé) #4

You can even use GradleBuild to call back into the same build script with different parameters :flushed:


(Vinay Verma) #5

Yes.

I called the same script by passing different parameters (for another environment) and it is working perfectly. :slight_smile: