Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run gradle commands from other directory

Tags:

java

gradle

I have folder "A" and folder "B"
Folder "B" is having gradle code I want to run gradle clean and gradle build command from folder "A" of folder "B"
How do I do this?

like image 968
NITISH DASTANE Avatar asked Jan 01 '23 12:01

NITISH DASTANE


1 Answers

You should use the "start directory" parameter (-p, --project-dir : see Environment options)

I think the other available parameter -b --build-file could work as well, but its main usage is when your build script filename differs from default build.gradle.

like image 136
M.Ricciuti Avatar answered Jan 05 '23 17:01

M.Ricciuti