1

I am new to gradle. I would like to pass a variable in gradle from comand line. Something similar to maven as shown below.

mvn clean install -Denvironment=DEV

And I get the above environment=DEV value in java as

System.getProperty("environment")

How Is it possible to do the same thing in Gradle? Is there any quick and easy way like in maven?

Jayan
  • 18,003
  • 15
  • 89
  • 143
vkrams
  • 7,267
  • 17
  • 79
  • 129

0 Answers0