How to call Gradle build script job from the "makeFile"?

Hi Team,

Could you please let me know if we can call the Gradle build script job from MakeFile . Scenario : The Production deployment server used makeFile to prepare release , currently makeFile calls Ant target such as clean, "clean:

$(ANT) clean "

compile etc… and produce the release package. Now i am replacing the ant build script to gradle and want to know if can call gradle job from makefile similar to Ant way ?

Thanks Brajendra

Hi Bajendra

Yes, you can call Gradle from your Makefile.

You can simply replace the Ant reference with Gradle, e.g.:

clean:

gradle clean

Or if you’re using the wrapper:

clean:

./gradlew clean

It looks like your makefile is declaring an ANT variable, perhaps to set ant properties. You can do the same thing for gradle, e.g.

GRADLE=gradle -i

clean:

$(GRADLE) clean

which would then run ‘gradle -i clean’ when you run ‘make clean’. You might want to find where the ANT variable is being set in your makefile setup and replace it with a GRADLE declaration.

Hope that helps!

Great. thanks a lot for your help !!