https://kotlinlang.org logo
Title
b

Baidyanath

09/13/2021, 12:58 PM
Hi Guys, Is it possible to run another gradlew project from gradlew project- Usecase: I've one backend service using gradlew, and I need to run another gradlew project which will be pulled in CI/CD pipeline. If yes, please suggest the way?
:not-kotlin: 4
s

simon.vergauwen

09/13/2021, 1:01 PM
It’s a bit ugly, but you can trigger command line commands from Gradlew. Whenever I run into these scenarios I typically grab for scripting.
It’s also possible to could build the other project into a docker image, and run the other project from code using test-containers.
I’ve used the second option in case the other project is another server.
b

Baidyanath

09/13/2021, 1:04 PM
Yeah, it seems but this P0 problem for me now. Can you suggest some commands in first way if it's easier?
Will definitely look into second way too.
BTW thanks for responding so quick.
👍 1
Here is an example in Gradle where we create a task to call
gradlew
for a different project in a different folder.
b

Baidyanath

09/13/2021, 1:15 PM
Thanks, I try and get back to you:)