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
  • 17,353
  • 13
  • 86
  • 137
vkrams
  • 6,887
  • 17
  • 75
  • 125

0 Answers0