Is it possible to call a gradle script withing it self

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:

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

1 Like

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

Thanks Again :slight_smile:

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


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